小功能JS代码——注册倒计时

代码
   
     
< form id = " form1 " name = " form1 " method = " post " action = "" >
< input type = " submit " name = " Submit " value = " 同意 " / >
< / form>
< script language = " javascript " >
document.form1.Submit.disabled
= true ;
var speed = 1000 ; // 速度
var wait = 10 ; // 停留时间
function updateinfo(){
if (wait == 0 ){
document.form1.Submit.value
= " 我同意 " ;
document.form1.Submit.disabled
= false ;
}
else {
document.form1.Submit.value
= " 阅读条款 " + wait;
wait
-- ;
window.setTimeout(
" updateinfo() " ,speed);
}
}
updateinfo();
< / script>

 

你可能感兴趣的:(倒计时)