Monday 16 July 2012

How to write single line comment to prevent execution in javascript


<!DOCTYPE html>
<html>
<body>

<h1 id="myH1"></h1>

<p id="myP"></p>

<script type="text/javascript">
//document.getElementById("myH1").innerHTML="Welcome to my Homepage";
document.getElementById("myP").innerHTML="This is my first paragraph.";
</script>

<p><strong>Note:</strong> The comment is not executed.</p>

</body>
</html>

0 Responses to “How to write single line comment to prevent execution in javascript”

Post a Comment