js倒计时

<SCRIPT>
secs = 60; // Number of secs to delay -CHINA-studio
wait = secs * 100;
document.forms.register.Submit.disabled =true;
for(i=1;i<=(wait/100);i++) {
  window.setTimeout("doUpdate(" + i + ")", i * 100);
}
window.setTimeout("Timer()", wait);

function doUpdate(num) {
  if(num == (wait/100)) {
   document.forms.register.Submit.value = " 同意注册 ";
  } else {
   wut = (wait/100)-num;
   document.forms.register.Submit.value = " 同意前请先阅读 (" + wut + ")";
  }
}

function Timer() {
  document.forms.register.Submit.disabled =false;
}
</SCRIPT>

资料来源:学网(www.xue5.com),原文地址:http://www.xue5.com/itedu/200801/58511.html

你可能感兴趣的:(html)