|
|
JavaScript Demos:
|
Discussion.If you are hand-editing HTML files, use of some template JavaScript code will save time and avoid simple typos. In the HTML HEAD section use this:
<script language="JavaScript" type="text/javascript">
<!-- begin hide me ...
//place code here
//end hide me -->
</script>
Then just after the HTML BODY include this:
<noscript> <h3>This page requires a suitably JavaScript-aware browser.</h3> </noscript>Non-aware browsers (e.g., Lynx) will ignore the block in the HEAD, both the SCRIPT tags and anything commented out between them. Aware browsers will interpret the code. Then in the BODY, aware browsers will skip the NOSCRIPT section, while non-aware browsers will ignore those tags and display the whatever message is contained. |
|