0
点赞
收藏
分享

微信扫一扫

60秒倒计时js

夏沐沐 2022-05-27 阅读 173

var wait=4; 
function time(o) {
if (wait == 0) {
o.removeAttribute(“disabled”);
o.innerHTML=”获取验证码”;
wait = 4;
} else { // www.jbxue.com
o.setAttribute(“disabled”, true);
o.innerHTML=”重新发送(” + wait + “)”;
wait–;
setTimeout(function() {
time(o)
},
1000)
}
}document.getElementById(“getCaptcha”).οnclick=function(){time(this);}

举报

相关推荐

0 条评论