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) 
         } 
      },
}

 

你可能感兴趣的:(jquery)