javascript實現頁面倒計時
阿新 • • 發佈:2020-08-19
<script language="javascript"> x = 60; function language_Change() { if (2==document.login.loginlanguage.value) { document.getElementById("loginbtn").value="登入"; document.getElementById("resetbtn").value="取消"; } else { document.getElementById("loginbtn").value="Login"; document.getElementById("resetbtn").value="Cancel"; } } function countSecone(){ if (x > 0){ x=x-1; document.getElementById("loginbtn").style="width:80"; if (2==document.login.loginlanguage.value){ var cnStr = "登入("; var cnStr2 = cnStr.concat(x,")"); document.getElementById("loginbtn").value=cnStr2; }else{ var enStr = "Login("; var enStr2 = enStr.concat(x,")"); document.getElementById("loginbtn").value=enStr2; } setTimeout('countSecone()', 1000); }else{ language_Change(); document.getElementById("loginbtn").style="width:60"; be_normal(document.login.loginsubmitbtn); be_normal(document.login.reset); } } function genesis() { document.getElementById("LANGUAGE_ID").style.display=""; language_Change(); document.login.loginusername.focus(); if(self!=top) window.open('login.asp','_parent',''); var LoginLook = "<% getInfo("LoginLock"); %>"; if (LoginLook == "1") { be_gray(document.login.loginsubmitbtn); be_gray(document.login.reset); countSecone(); } } </script>