方便以后 拿來就用
復制代碼 代碼如下:
<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>
新聞熱點
疑難解答
圖片精選