jQuery 发送验证码倒计时按钮


  wait:90,

   hsTime:function(that){

         if (this.wait == 0) {
             $('#hsbtn').removeAttr("disabled").val('重发短信验证码');          
             this.wait = 90;
         } else {
             var _this = this;
             $(that).attr("disabled", true).val('在'+_this.wait+'秒后点此重发');
             _this.wait--;
             setTimeout(function() {
                 _this.hsTime(that);
             }, 1000)
         }
      },
}

猜你喜欢

转载自liuxiaobin1023-163-com.iteye.com/blog/2325850