Re: 3.1 Question

by "Duncan Austin" <duncan1a(at)hotmail.com>

 Date:  Tue, 10 Aug 1999 04:02:02 PDT
 To:  sll(at)chariot.net.au
 Cc:  hwg-basics(at)hwg.org
  todo: View Thread, Original
Hi there

Old browsers may not support javascript and so don't know what to do with 
it. They just spit your code out as if it were normal text.

To avoid this, use html comments. Comments tell the browser to ignore 
whatever is between them. They go as follows:

Inside your <script> tags type <!--   and  //-->
Altogether your code should look as such:

<script>
<!--
code goes here....
//-->
</script>

If you do this, old browsers will treat your code as a comment and ignore 
it.

You can use comments anywhere in your page. For eg, if you want to give 
instructions to someone reading your source or give/claim credit
-- eg:

<!-- Page by SLL //-->

People reading your code will see it but browsers will ignore it.


Hope I'm making sense :-)

Duncan


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA