代码很简单,直接上代码了,大家可以复制下面的代码保存成HTML文件运行看效果 复制代码 代码如下: <br>function Change(HourSurplus,MinuteSurplus,SecondSurplus)<br>{<br><br> SecondSurplus = SecondSurplus - 1;<br> if (SecondSurplus<0) <BR> { <BR> SecondSurplus=60 SecondSurplus; <BR> MinuteSurplus=MinuteSurplus-1; <BR> } <BR> if (MinuteSurplus<0) <BR> { <BR> MinuteSurplus=60 MinuteSurplus; <BR> HourSurplus=HourSurplus-1; <BR> }<BR> document.getElementById("asd").innerHTML="" HourSurplus ":" MinuteSurplus ":" SecondSurplus "";<BR> setTimeout(function() {<BR> Change(HourSurplus,MinuteSurplus,SecondSurplus);<BR> },1000);<BR>}</P> <P>11111<br>Change(1,59,59);<br>