Hiding JS code from old browsers
To prevent old browsers from displaying your JS code,
do the following:
- Immediately after the opening
put a one-line HTML-style comment without the closing characters,
so that the first two lines of your script would look like this:
- At the end of your script, put the following two lines:
Thus, your HTML file will contain the following fragment:
Here you put your JS code.
Old browsers will treat it
as an HTML comment.
Old browsers will treat your JS code as one long HTML comment.
normally interpret JS code between the tags
(the first and last lines of your JS code will be treated
© 1999-2006, Alexei Kourbatov