js 验证码倒计时

递归思想

function settime(){
            if (countdown == 0) {
                  countdown = 60;
                  }else{
                   countdown--; 
                  $("#getVerification").val("重新发送("+countdown+")");
                 setTimeout(function(){
                        settime();
                },1000);
                  }
        }

猜你喜欢

转载自blog.csdn.net/zf18234031156/article/details/88980480