<html> <head> <title>Yet Another Silly JavaScript Clock</title> <script> //javascript clock script function Clock() { D = new Date(); hh = D.getHours(); mm = D.getMinutes(); ss = D.getSeconds(); yy = D.getYear(); mt = D.getMonth() + 1; dd = D.getDate(); // change the digit images document.images[8].src = Url(hh/10); document.images[9].src = Url(hh%10); document.images[11].src = Url(mm/10); document.images[12].src = Url(mm%10); document.images[14].src = Url(ss/10); document.images[15].src = Url(ss%10); // time above, date below document.images[0].src = Url(mt/10); document.images[1].src = Url(mt%10); document.images[3].src = Url(dd/10); document.images[4].src = Url(dd%10); document.images[6].src = Url(yy/10); document.images[7].src = Url(yy%10); // set timeout for next time (half second) window.setTimeout("Clock()",500); } // converts 4 (numeric) to "c4.gif" function Url(num) { num = Math.floor(num); return "c" + num + ".gif"; } </script> </head> <body onLoad="window.setTimeout('Clock();',3000)"> <p align="center"><img src="c6.gif" HEIGHT="20" WIDTH="15"><img src="c7.gif" HEIGHT="20" WIDTH="15"><img src="slash.gif" HEIGHT="20" WIDTH="13"><img src="c8.gif" HEIGHT="20" WIDTH="15"><img src="c9.gif" HEIGHT="20" WIDTH="15"><img src="slash.gif" HEIGHT="20" WIDTH="13"><img src="c0.gif" HEIGHT="20" WIDTH="15"><img src="c0.gif" HEIGHT="20" WIDTH="15"> <img src="c0.gif" HEIGHT="20" WIDTH="15"><img src="c1.gif" HEIGHT="20" WIDTH="15"><img src="colon.gif" HEIGHT="20" WIDTH="9"><img src="c2.gif" HEIGHT="20" WIDTH="15"><img src="c3.gif" HEIGHT="20" WIDTH="15"><img src="colon.gif" HEIGHT="20" WIDTH="9"><img src="c4.gif" HEIGHT="20" WIDTH="15"><img src="c5.gif" HEIGHT="20" WIDTH="15"> </p> </body> </html>

1998 Copyright (C) Next Step Software All Rights Reserved