Styles MenuThe BeelineTips & Tricks MenuJavaScript MenuGrouping

JavaScript

Comments

Comments identify commands within JavaScript code. They must be placed within the <SCRIPT>...</SCRIPT> tag set to work.

Syntax

This comment

// comment

is a single-line comment where comment is any one line of text, whereas

/* comment */

is a multiple-line where comment is any amount of plain-English text.

<!-- comment

code

// comment -->

The preceding example shows the hide comment, where the comment is any (optional) text and code is JavaScript instructions. This comment hides JavaScript code from non-JavaScript browsers.

Examples

<SCRIPT LANGUAGE = "JavaScript">

<!-- This will start hiding code from non-JavaScript browsers.

//This is a comment, and will be ignored.

document.write ("Hello")

/*Here's a two line comment that will
be ignored */

document.write ("Goodbye")

// and this stops the hiding -->

</SCRIPT>

Return to JavaScript MenuJavaScript

Click for details.

Click for details.Click for details.

Top of PageTool Bar 1Tool Bar 2Tool Bar 3Tool Bar 4Tool Bar 5Tool Bar 6Tool Bar 7Add RequestChange Request
Styles MenuTool Bar 11Tool Bar 12Tool Bar 13Tool Bar 14Tool Bar 15Tool Bar 16Tool Bar 17KeyholeReport Menu

Home PageMain Text MenuMain Tables MenuMain Frames MenuMain Buttons MenuMain TV MenuMain HiveCD MenuMenu Styles Information


Notice 1

Legal notices - Part 1
Special Notice
Legal notices - Part 2
Notice 2