var count = 0; var startTime; document.getElementById("start").onclick = function () { startTime = setInterval(function () { count = count + 0.01; show = count.toFixed(2); document.getElementById("time").innerHTML = show; }, 10); }; document.getElementById("stop").onclick = function () { clearInterval(startTime); };
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)