js 笔记
时间:2011-04-22 来源:木由水
function funNumberCount() {
numTmp = getCookie("numTmp");
document.getElementById('btnCount').value = numTmp;
numTmp--;
if (numTmp == -1) {
clearInterval(interval);
document.getElementById('btnCount').disabled = false;
document.getElementById('btnCount').value = "发送短信";
}
setCookie("numTmp", numTmp, 1);
}
function btnClick() {
if (getCookie("numTmp") == ""||getCookie("numTmp")<="-1") {
setCookie("numTmp", 9, 1);
}
else {
interval = setInterval(funNumberCount, 1000);
document.getElementById('btnCount').disabled = true;
return;
}
}
相关阅读 更多 +