<!DOCTYPE html>
<html>
<head>
    <title></title>
    <script src="../scripts/jquery.js" type="text/javascript"></script>
    <script>
        $(function () {
            var util = {
                wait: 90,
                hsTime: function (that) {
                    _this = $(this);
                    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)
                    }
                }
            }
            util.hsTime('#hsbtn');
            $("#hsbtn").click(function(){
                util.hsTime('#hsbtn');
            })
        })
    </script>
</head>
<body>
<input type="button"  />
</body>
</html>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-30
  • 2021-12-24
  • 2022-02-09
  • 2022-12-23
  • 2021-11-25
猜你喜欢
  • 2021-12-25
  • 2022-12-23
  • 2021-10-31
  • 2022-12-23
  • 2021-12-02
  • 2022-12-23
相关资源
相似解决方案