How to hide JavaScript code from old browsers that does not support JavaScript?

Q

How to hide JavaScript code from old browsers that does not support JavaScript?

✍: Guest

A

Use the below specified style of comments:

<script language=javascript>
<!--
javascript code goes here
// -->
</script>

or

Use the <NOSCRIPT> and </NOSCRIPT> tags and code the display html statements between these and this will appear on the page if the browser does not support javascript

2008-10-07, 4322👍, 0💬