<form ID="Form1">
<input type="submit" name="rulesubmit" value="同 意" style="height: 23px" ID="Submit1">
<input type="button" name="return" value="不同意" style="height: 23px" onclick="javascript:history.go(-1);"
ID="Button1">
</form>
</center>
<script language="javascript">
var secs = 9;
var wait = secs * 1000;
document.all.rulesubmit.value = "同 意(" + secs + ")";
document.all.rulesubmit.disabled = true;
for(i = 1; i <= secs; i++) {
window.setTimeout("update(" + i + ")", i * 1000);
}
window.setTimeout("timer()", wait);
function update(num, value) {
if(num == (wait/1000)) {
document.all.rulesubmit.value = "同 意";
} else {
printnr = (wait / 1000)-num;
document.all.rulesubmit.value = "同 意(" + printnr + ")";
}
}
function timer() {
document.all.rulesubmit.disabled = false;
document.all.rulesubmit.value = "同 意";
}
</script>
转载于:https://www.cnblogs.com/wzhxj/archive/2005/12/24/303761.html