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);
}
网友评论