Adding the current (albeit static) date and time to your page (similar to the above) is also very easy. For several reasons its a good idea to keep your scripts in separate
documents. Among other reasons this allows quick access to them from several of your HTML pages, just like your CSS style sheets. To use this function;
Step 1: COPY the following code into a new text document and save it as time.js
Step 2: COPY the following code and place it in your HTML page where you'd like the time to be displayed.
Note: You can position the time string on your page simply by replacing the word 'center' in your time.js document with either 'left' or 'right'
Simple Clock Function
Want a more conventional looking (and dynamic) clock? Try this method from The JavaScript Source;
Step 1: COPY the following code and paste it into the HEAD section of your HTML document;
Step 2: COPY the following onLoad event handler code and paste it into the BODY tag of your HTML document;
Step 3: COPY this code and PASTE it into the BODY of your HTML document where you'd like the clock to be displayed;