為什么這樣的代碼不能實現數字遞減呢
<!DOCTYPE html>
<html>
?<head>
? <title>瀏覽器對象</title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gkb"/> ??
?</head>
?<body>
? <!--先編寫好網頁布局-->
? <h1>操作成功</h1>
? <span id="count">5</span>
<script type="text/javascript"> ?
? ?//獲取顯示秒數的元素,通過定時器來更改秒數。
? ?var num=5;
? ? function conut(){
? ? ? ? num--;
? ? ? ? document.getElementById("count").innerHTML=num;
? ? ? ? }
? ? ? ?var i=setInterval("count()",1000);
? ?//通過window的location和history對象來控制網頁的跳轉。
? ?
?</script>?
</body>
</html>
2015-07-03
我瞎了 ?三樓火眼金精啊
2015-06-24
2015-06-19
2015-06-19
setInterval里面傳函數名,不是調用函數.