js多少秒倒计时
function countDown(tim) { var timer = null, tim = tim || 60; var again = tim; clearInterval(timer); timer = setInterval(function() { tim--; document.getElementById("time").innerHTML = tim; if (tim <= 0) { //clearInterval(timer); CloudStatistics(); tim = again; } }, 1000); } countDown(60);
--谨记铭心