var count = 5;
var countdown = setInterval(CountDown, 1000);
function CountDown() {
$(".retext-code").addClass("layui-btn-disabled").attr("disabled", true);
$(".retext-code").text("重发(" + count + " S)");
if (count == 0) {
$(".retext-code").removeClass("layui-btn-disabled").attr("disabled", false);
$(".retext-code").text("重发");
clearInterval(countdown);
}
count--;
}倒计时的时候还要防刷新,求大神帮忙~~~
添加回答
举报
0/150
提交
取消