HTML Digital Clock for website

Description

  • HTML and Javascript code to create a digital clock on your website that will always display the current time on a page. Each digit for the clock is image based.

Steps

  1. Save the number images and stick them in the same directory as the page. (you can also download a zip file of everything)
  2. Copy and Paste the Source Code into your HTML page.
  3. You are welcome to use your own images for this. Just be sure the image names are the same as the ones used here. (eg; "dg8.gif" for the "8")
  4. For those of you looking for more, there are several variations:




Source Code


Numbers to save: (or zip of files)

Comments

I want to place clocks at varying places with different tzoffsets. When I do the entire code, the first one reads the time when webpage first loads but does not run, the subsequent clocks just show all 8s.

Unfortunately what you are asking is harder than it sounds. The script would need to be significantly modified to support multiple sets of clock images. Right now if you add multiple clocks to the same page there are naming conflicts so the script doesn't know what images to change.