A digital clock in a table


The date and time are retrieved from the computer and put into a variable called currentTime (currentTime=new Date()).

setTimeout is used to repeat the function clockTick() (get the new time) every second. It makes it look like the clock is ticking, because, for just a split second, the display is "blurred" (the focus is taken away to something else).

A form is used (a "text" box) to display the time. The text box is inside a table with a background color.

If you view the page in Netscape, you may see "GMT.", GMT -0700 means that we are seven hours earlier than Greenwich mean time.