The following script will display formatted current time on the face of a webpage within a span container
providing a means to render it in the middle of a paragraph.
The code consists of a timer that times for one second, then calls a routine
that extracts the current time using the Date() function. A one shot signal
is needed to trigger the first iteration and must be positioned after the first
reference in the body. This trigger could be either in a footer script or
via the body onload attribute as shown below.. Time displayed is user's local time.
|