THIS is a simple JavaScript fragment
that you can place at the end of
ANY web document. Henceforth, the
last modification date of your web document
will automatically be maintained!
1. < script language="LiveScript" >
2. < !-- hide from old browsers
3. document.write("Behold! Last Modified: ", document.lastModified)
4. // end hiding -- >
5. < /script >
EXPLANATION:
-- the first line declares that you are using a JavaScript
("LiveScript" is really JavaScript).
-- the second and fourth lines looks just like the start and end of
a standard "multiline comment". So the webbrowser
is supposed to ignore everything in between these 2 lines.
However, JavaScript does not ignore them.
-- indeed, the third line is a write command for your document.
JavaScript will execute this write command.
The 2 arguments for the write command are:
(a) a literal string, and
(b) the "lastModified" field of your document.