如何停止计数?
var num=0; function startCount() { document.getElementById('count').value=num; num=num+1; setTimeout("startCount()",1000); if(num==10){ break;//报错 } } setTimeout("startCount()",1000);
var num=0; function startCount() { document.getElementById('count').value=num; num=num+1; setTimeout("startCount()",1000); if(num==10){ break;//报错 } } setTimeout("startCount()",1000);
2017-08-28
举报