Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Multi-line JavaScript Comments</title> </head> <body> <h2>JavaScript Comments to Prevent Execution </h2> <h1 id="myHeading"></h1> <p id="myParagraph"></p> <script> /* document.getElementById("myHeading").innerHTML = "Welcome to my website"; document.getElementById("myParagraph").innerHTML = "This is my hidden paragraph."; */ document.getElementById("myParagraph").innerHTML = "I have a comment-block that is not executed."; </script> </body> </html>