Previous Example-|-Next Example-|-Return to Chapter Listing

Example 3.2:
A Quick Look at Functions


The first part of the script in this page doesn't appear to do anything--it defines a function, but the user can't see it. In Example 3.3, though, we call the function.

The second part of the script writes the document's last-modified date, as in Example 3.1.





This is the script we used:
<SCRIPT LANGUAGE="JAVASCRIPT"> <!-- function AlertBox(){ alert("This is the alert box" ) } document.write("This document last modified on: ") document.write(document.lastModified) //--> </SCRIPT>
Previous Example-|-Next Example-|-Return to Chapter Listing