标签:c style class blog code java
function countdown (id, seconds){ var elem = document.getElementById(id); var iniseconds = numseconds = parseInt(seconds) || 60; var downtime; var callback = function (num){ var numhtml = "<i>"+ num +"</i> 重新发送"; elem.setAttribute("disabled", "disabled"); elem.innerHTML = numhtml; if (num <= 0){ elem.removeAttribute("disabled"); elem.innerHTML = "重新发送"; } } var doTiming = function (){ callback(numseconds); if (numseconds <= 0){ clearTimeout(downtime); return; } numseconds--; downtime = setTimeout(arguments.callee, 1000); }(); }
从来就没有想起,永远也不会忘记
标签:c style class blog code java
原文地址:http://www.cnblogs.com/smyanghui/p/3759294.html