时间:2021-07-01 10:21:17 帮助过:6人阅读
<script language="javascript">
function timer(){
var value=Number(document.all['time'].value);
if (value>1) document.all['time'].value=value-1;
else {
document.all['time'].value="同意";
return false;
}
window.setTimeout("timer()",1000);
}
</script>
<body onload="timer()">
<input name="time" value="10" type="button" style="width:40px;" />
</body>