Using HTML Comments to Hide JavaScript Code : JavaScript in HTML « Development « JavaScript DHTML






Using HTML Comments to Hide JavaScript Code


<html>
<head>
<title>Using HTML comments to hide JavaScript code</title>
</head>
<body>
<script language="JavaScript">
<!-- Begin hiding JavaScript

document.write("Hello World!");

// End hiding JavaScript -->
</script>
</body>
</html>
           
       








Related examples in the same category

1.HTML comment that hides the script.
2.JavaScript Embedded in an HTML File
3.Embedding JavaScript in HTML
4.Inserting Source JavaScript Files
5.Using the Head for Definitions
6.A Basic JavaScript Starter Document
7.JavaScript Template File
8.Embedding a JavaScript Function