取消计时器clearTimeout()
点击start没有反应是怎么回事,代码没有错吧
var num=0;
var i;
function startCount(){
document.getElementById('count').value=num;
num=num+1;
i=setTimeout("startCount()",1000);
}
function stopCount(){
clearTimeout(i);
}
<input type="button" value="Start" onclik="startCount()" />
<input type="button" value="Stop" onclik="stopCount()" />