stop停不下来。
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>计时器</title>
<script type="text/javascript">
var num=0;
var i;
function startCount(){
clearTimeout(i);
document.getElementById('txt').value=num;
num=num+1;
i=setTimeout("startCount()",1000);
}
function stopConut(){
clearTimeout(i);
}
</script>
</head>
<body>
<input type="text" id="txt" >
<input type="button" value="start" onClick="startCount()" />
<input type="button" value="stop" onClick="stopCount()" />
</body>
</html>
救命啊,看了半天不明白为啥停不下来啊。start是能正常工作的,但为啥就是停不下来啊!求高手指点!