javascript让按钮倒计时10秒以后才能提交

javascript让按钮倒计时10秒以后才能提交

<script language=javascript>
function countDown(secs,surl){
//alert(surl);

tiao.innerText=secs;
if(--secs>0){
setTimeout("countDown("+secs+",'"+surl+"')",1000);
}
else{

location.href=surl;
}
}
</script>

<br><span id="tiao"></span>秒后自动跳转到PHPINFO页面<script language=javascript>countDown(3,'phpinfo.php');</script>

如果您觉得我的文章有帮助,请随意赞赏!

*发表评论

用QQ账号登录  请登录后发表评论