Back to David.Blackledge.com
Back to JavaScript
Small JavaScript Analog Clock
Tired of the boring digital clocks? How about a more old-fashioned analog clock with a face and hands? You can use this one on your webpage as is for free. It's tiny, easy to use, and includes a second hand, so it's attention-getting.
Although there are a number of analog clocks that use layers and dots for the hands and such, those only work in version 4 and higher browsers. There are also a few that just use lots of images... but that's a bit much. However, it ends up I did find somebody else who already did this with the same technique in his JavaScript Analog Clock which is prettier, but his is awfully big, not as nice for just sticking in your web page, and it only updates every minute.

Note, this is free and just for fun... There are no guarantees or warranties or anything like that... in other words, don't sue me.

Requirements: The only real requirement is JavaScript since it should work in almost any browser that supports it. In general, Netscape 3 or above, or Internet Explorer (not sure what is the minimum version, but it works in 5.0 and above, and should work in earlier ones as well).

It's pretty robust and should survive even if you have a complex page with lots of JavaScript and DHTML.

All you have to do is download the file dlbClock.js and put it in the same directory as your web page, then copy and paste the following in your webpage at the location you want the clock to appear.

<SCRIPT language="JavaScript" SRC="dlbClock.js"></SCRIPT>

Or, for any weirdos that insist it must ALL be cut & paste, and no downloading, copy and paste:

<SCRIPT language="JavaScript">

then select, copy, and paste everything in this pop-up window. Then copy and paste:

</SCRIPT>