我想实现一个功能:让一个按钮隔一定时间以后才能点击,如何实现啊?php和javascript都可以,请大家帮帮忙啊!
我想实现一个功能:让一个按钮隔一定时间以后才能点击,我该如何实现啊?php和javascript都可以,请大家帮帮忙啊!...
我想实现一个功能:让一个按钮隔一定时间以后才能点击,我该如何实现啊?php和javascript都可以,请大家帮帮忙啊!
展开
1个回答
展开全部
<SCRIPT>
secs = 60; // Number of secs to delay -CHINA-studio
wait = secs * 100;
document.forms.register.Submit.disabled =true;
for(i=1;i<=(wait/100);i++) {
window.setTimeout("doUpdate(" + i + ")", i * 100);
}
window.setTimeout("Timer()", wait);
function doUpdate(num) {
if(num == (wait/100)) {
document.forms.register.Submit.value = " 同意注册 ";
} else {
wut = (wait/100)-num;
document.forms.register.Submit.value = " 同意前请先阅读 (" + wut + ")";
}
}
function Timer() {
document.forms.register.Submit.disabled =false;
}
</SCRIPT>
secs = 60; // Number of secs to delay -CHINA-studio
wait = secs * 100;
document.forms.register.Submit.disabled =true;
for(i=1;i<=(wait/100);i++) {
window.setTimeout("doUpdate(" + i + ")", i * 100);
}
window.setTimeout("Timer()", wait);
function doUpdate(num) {
if(num == (wait/100)) {
document.forms.register.Submit.value = " 同意注册 ";
} else {
wut = (wait/100)-num;
document.forms.register.Submit.value = " 同意前请先阅读 (" + wut + ")";
}
}
function Timer() {
document.forms.register.Submit.disabled =false;
}
</SCRIPT>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询