短信倒计时 demo
作者:
fourn熊能 | 来源:发表于
2019-10-23 11:16 被阅读0次function getCodeBtnChange(btn, _resetTitle, _resetFunction) {
var waitTime = 3;
var _gocartoon;
btn.html('重新发送(' + waitTime + ')S');
btn.unbind('click');
btn.addClass('sel');
var _gotime = function () {
waitTime -= 1;
btn.html('重新发送(' + waitTime + ')S');
if (waitTime === 0) {
clearInterval(_gocartoon);
btn.html(_resetTitle);
btn.click(_resetFunction);
btn.removeClass('sel');
}
};
_gocartoon = setInterval(_gotime, 1000);
}
本文标题:短信倒计时 demo
本文链接:https://www.haomeiwen.com/subject/lcghvctx.html
网友评论