You need to download digits1.zip, un-zip it and upload the contents to your internet directory.
| <SCRIPT>
//assign an HTML string to the variable
colon, this makes it easier to read code later on var colon = '<IMG SRC="digits/colon.gif">'; //create the initial HTML images & names so that they can be used by JavaScript later on document.write('<IMG SRC="digits/0.gif" NAME="h0">'); document.write('<IMG SRC="digits/1.gif" NAME="h1">'); document.write(colon); document.write('<IMG SRC="digits/2.gif" NAME="m0">'); document.write('<IMG SRC="digits/3.gif" NAME="m1">'); document.write(colon); document.write('<IMG SRC="digits/4.gif" NAME="s0">'); document.write('<IMG SRC="digits/5.gif" NAME="s1">'); document.write('<IMG SRC="digits/am.gif" NAME="tod">'); function upDate() {//create a Time Variable called now, //then get the hours, minutes, & seconds from this variable var now = new Date(); var hours = now.getHours(); var minutes = now.getMinutes(); var seconds = now.getSeconds(); var ampm = "am"; //am or pm? //since hours
go from 0 - 23 the hours need to be converted //if hour = 0
then convert to 12, //if less then
10 we need the "0" placeholder for hours //if
less then 10 we need the "0" placeholder for minutes //if less then
10 we need the "0" placeholder for seconds //swap out the
old images with the "new images" (the new time) //the window
method setTimeout() causes upDate() to run, </SCRIPT> after "everything" is loaded into memory |