Source Code:
(back to article)
<!DOCTYPE html> <html> <head> <title>Title of the Document</title> </head> <body> <p>Paragraph</p> <div>div</div> <script> alert( document.body.innerHTML ); // read the current contents document.body.innerHTML = 'The new body!'; // replace it </script> </body> </html>
Result:
Report an issue