<html>
<head></head>
<body>
<SCRIPT LANGUAGE="JavaScript">
<!--
var maxtime = 5; //一个小时,按秒计算,自己调整!
function CountDown(){
//var timerw=document.getElementById("timer"); //方法1
var timerw=document.all["timer"]; //方法2
if(maxtime>0){
seconds = Math.floor(maxtime%60);
msg = "同意("+seconds+"\")";
timerw.value=msg;
if(maxtime == 5*60) alert('注意,还有5分钟!');
--maxtime;
}
else{
clearInterval(timer);
timerw.value="同意";
timerw.disabled=false;
//alert("时间到,结束!");
}
}
timer = setInterval("CountDown()",1000);
//-->
</SCRIPT>
<input id="timer" type="button" value='同意(3")' style="color:#000;" disabled="true" />
</body>
</html>
<head></head>
<body>
<SCRIPT LANGUAGE="JavaScript">
<!--
var maxtime = 5; //一个小时,按秒计算,自己调整!
function CountDown(){
//var timerw=document.getElementById("timer"); //方法1
var timerw=document.all["timer"]; //方法2
if(maxtime>0){
seconds = Math.floor(maxtime%60);
msg = "同意("+seconds+"\")";
timerw.value=msg;
if(maxtime == 5*60) alert('注意,还有5分钟!');
--maxtime;
}
else{
clearInterval(timer);
timerw.value="同意";
timerw.disabled=false;
//alert("时间到,结束!");
}
}
timer = setInterval("CountDown()",1000);
//-->
</SCRIPT>
<input id="timer" type="button" value='同意(3")' style="color:#000;" disabled="true" />
</body>
</html>