Full width home advertisement

How To

Science

Post Page Advertisement [Top]


Hiding script from older browser can be needed or useful for some older browsers that do not understand JavaScript or VBScript, so that these browsers won’t print the script code as a normal text element. 

If a browser doesn't support JavaScript or VBScript, instead of executing your script, it would display the code to the user as a normal text element. To avoid this, you can simply place the script code inside HTML comments:.

JavaScript Example:

<script type="js/JavaScript">

<!--

document.write("Hello JavaScript!");

//-->

</script>


VBScript Example:

<script type="vbs/vbscript">

<!--

document.write("Hello VBScript!")

'-->

</script>

No comments:

Post a Comment

Bottom Ad [Post Page]

| Designed by Colorlib