Comment
This tag begins and ends a comment block. This is useful for
documenting your HTML page and for indicating copyright notices. Perhaps
one of the most useful things to do with comments is to place script
blocks within comments. This prevents browsers that do not understand
scripts from generating errors.
<!-- Copyright
(c) 2000 by Richard Lowe --> |
A quick single line comment.
<SCRIPT LANGUAGE="javascript">
<!--//
var jsparamSPR = "CHS";
var jsparamT1 = "7d";
var jsparamSG = "";
var jsparamFR = "0";
var jsparamPSL = "0";
var jsparamLQ = "";
var jsparamT = "B";
var jsparamA = "T";
var jsparamS = "F";
var jsparamKT = "ALL";
var jsCorrectLanguage = false;
var jsSupportServer = "support.microsoft.com";
var jsMSComServer = "www.microsoft.com";
//-->
</SCRIPT>
|
Here comments are used to hide the contents of a script
from browsers that do not understand scripting. As you can see from this
example, a comment can be comprised of more than one line.
-
Use comments around script blocks. This ensures that
your scripts do not generate errors in older browsers.
-
Be very sparing with other comments. These are
characters within your HTML files just like anything else. They will
slow down the load time of your pages.
|