点击按钮输入框会从0开始一直进行计时,具体的实现示例如下,感兴趣的朋友可以尝试操作下哦
方便以后 拿来就用 
复制代码 代码如下:
 
<html> 
<head> 
<script type="text/javascript"> 
var c=0 
var t 
function timedCount() 
{ 
document.getElementById('txt').value=c 
c=c+1 
t=setTimeout("timedCount()",1000) 
} 
</script> 
</head> 
<body> 
<form> 
<input type="button" value="开始计时!"> 
<input type="text"> 
</form> 
<p>点击上面的按钮 输入框会从 0 开始一直进行计时。</p> 
如有其它形式,可以方便修改,诸如隐藏计时器,定时弹框 
</body> 
</html> 
您可能感兴趣的文章:
