taken right from the source of that page:
<script type="text/javascript">
<!--
var secs = 10;
var wait = secs * 1000;
document.sform.submitbtn.disabled=true;
for(i=1;i<=secs;i++) {
window.setTimeout("update(" + i + ")", i * 1000);
}
window.setTimeout("timer()", wait);
function update(num) {
if(num == (wait/1000)) {
document.sform.submitbtn.value = "Accept";
}
else {
printnr = (wait/1000)-num;
document.sform.submitbtn.value = "Accept (" + printnr + ")";
}
}
function timer() {
document.sform.submitbtn.disabled=false;
}
//-->
</script>
of course, the form would be named sform ( <form name="sform" .. > ) and the button submitbtn ( <input type="submit" name="submitbtn" .. > )
|