$('#send_smsn').click(function(){ $.post('/mobile.php/Public/sms', function (data) { $('#send_smsn').html(data.msg); if(data.status ==1){ $('#send_smsn').attr("disabled", true); count = 60; setInterval(setReminTime, 1000); } }); }); //验证码倒计时 function setReminTime() { if (count==0){ $('#send_smsn').removeAttr('disabled'); $('#send_smsn').html('重新发送'); }else{ count--; $('#send_smsn').html(count+'秒后重新发送'); } }
验证码发送后倒计时
最新推荐文章于 2023-07-22 15:24:33 发布