JS代码如下:
var secs = 9;
var wait = secs * 1000;
document.bbrules.rulesubmit.value = "同 意(" + secs + ")";
document.bbrules.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.bbrules.rulesubmit.value = "同 意";
} else {
printnr = (wait / 1000)-num;
document.bbrules.rulesubmit.value = "同 意(" + printnr + ")";
}
}
function timer() {
document.bbrules.rulesubmit.disabled = false;
document.bbrules.rulesubmit.value = "同 意";
}
</script>
其中rulesubmit是同意按钮的名字 那document.bbrules.是指什么呢? 如果我自已写这里该怎么改?
看了好多网站都是这样的 这里用的都是“document.bbrules.” 实在想不明白