给网页加一个按秒跳动的时钟,可以吗?
rt 问题点数:70、回复次数:2Top
1 楼meizz(梅花雪)回复于 2002-12-15 20:30:54 得分 70
<input size=9 type=text name=clock style="border:solid 1px #FFFFFF">
<script language="Javascript"><!--
function timer()
{
now = new Date();
h = (now.getHours() > 9) ? now.getHours() : "0" + now.getHours();
m = (now.getMinutes() > 9) ? now.getMinutes() : "0" + now.getMinutes();
s = (now.getSeconds() > 9) ? now.getSeconds() : "0" + now.getSeconds();
clock.value =""+h+":"+m+":"+s+"";
setTimeout( 'timer()',1000);
} timer();
// --></script>Top
2 楼zwl2002()回复于 2002-12-15 20:35:21 得分 0
你总可以在我这拿到分!!Top




