<HTML>
<HEAD>
<TITLE>Demos</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<SCRIPT language=Javascript>
function start(){
timer = new Array(10);
timer[1]= new Image(15, 19);
timer[1].src = "pics/1.gif";
timer[2] = new Image(15, 19);
timer[2].src = "pics/2.gif";
timer[3] = new Image(15, 19);
timer[3].src = "pics/3.gif";
timer[4] = new Image(15, 19);
timer[4].src = "pics/4.gif";
timer[5] = new Image(15, 19);
timer[5].src = "pics/5.gif";
timer[6] = new Image(15, 19);
timer[6].src = "pics/6.gif";
timer[7] = new Image(15, 19);
timer[7].src = "pics/7.gif";
timer[8] = new Image(15, 19);
timer[8].src = "pics/8.gif";
timer[9] = new Image(15, 19);
timer[9].src = "pics/9.gif";
timer[0] = new Image(15, 19);
timer[0].src = "pics/0.gif";
maj();
}
function change(nom, index)
{
image = eval("timer[" + index + "].src");
if (document [nom].src != image)
{
document [nom].src = image
}
}
function maj()
{
hour = new Date();
h = hour.getHours();
m = hour.getMinutes();
s = hour.getSeconds();
h1 = Math.floor(h / 10);
h2 = h % 10;
m1 = Math.floor(m / 10);
m2 = m % 10;
s1 = Math.floor(s / 10);
s2 = s % 10;
change("hour1", h1);
change("hour2", h2);
change("minute1", m1);
change("minute2", m2);
change("second1", s1);
change("second2", s2);
setTimeout("maj()" ,1000)
}
</SCRIPT>
</HEAD>
<BODY bgColor=#ffffff onload=start()>
<P align=center>
<IMG height=19 name=hour1 src="pics/0.gif" width=15>
<IMG height=19 name=hour2 src="pics/1.gif" width=15>
<IMG height=19 src="pics/sep.gif" width=15>
<IMG height=19 name=minute1 src="pics/2.gif" width=15>
<IMG height=19 name=minute2 src="pics/3.gif" width=15>
<IMG height=19 src="pics/sep.gif" width=15>
<IMG height=19 name=second1 src="pics/4.gif" width=15>
<IMG height=19 name=second2 src="pics/5.gif" width=15></P>
</BODY></HTML>
|