Wednesday, October 26, 2011

Single line comments

The // comment tag enables comments to be placed between the // and the end of the line.

Example :

<html>
<head>
<title>A Simple Page</title>
<script language="javascript">
<!--
// The first alert is below
alert("An alert triggered by JavaScript!");
// Here is the second alert
alert("A second message appears!");
//  -->
</script>
</head>
<body>

</body>
</html>


References from  http://www.java2s.com/Tutorial/JavaScript/

0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More