js
復制代碼 代碼如下:
<script language="javascript">
<!--
var wait_time = 8; //設置秒數(單位秒)
var secs_time = 0;
for(var i=1;i<=wait_time;i++)
{
window.setTimeout("sTimer("+i+")",i*1000);
}
function sTimer(num)
{
if(num==wait_time)
{
document.getElementById("reg_btn").value=" 同意注冊 ";
document.getElementById("reg_btn").disabled=false;
}
else
{
secs_time=wait_time-num;
document.getElementById("reg_btn").value="請先閱讀服務條款 ("+secs_time+")";
}
}
//-->
</script>
html
復制代碼 代碼如下:
<div style="width:350px; text-align:center;">
<form name="regForm" method="post" action="">
<input type="submit" value="請先閱讀服務條款 (0)" disabled="disabled" id="reg_btn">
<input id="BtnClose" type="button" value=" 我不同意 " onclick="window.close();">
</form>
</div>