Go Back   CP Web Hosting - reseller hosting > Browser Scripting, HTML, XML and Multimedia > JavaScript
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-11-2007, 07:02 AM
Senior Member
 
Join Date: May 2007
Posts: 951
Default The other way of ending a comment is to begin a JavaScript one-line comment

The other way of ending a comment is to begin a JavaScript one-line comment-the kind that starts with // and ends with the end of the source line. Just make sure that the --> is at the end of the comment. As with the first method, browsers that don't support JavaScript will close the comment that was begun after the <SCRIPT> tag when they see the --> at the end of the comment. Netscape sees it as a routine JavaScript comment.
Reply With Quote
  #2 (permalink)  
Old 07-11-2007, 07:04 AM
Senior Member
 
Join Date: May 2007
Posts: 908
Default

And the only drawback to this technique is that it forces the </SCRIPT> tag to be on the next source line. If it were on the same line as the one-line comment, it would become part of the comment.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:01 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0