songwy

//BUTTON防止暴力点击运行的JS
var BTN_METHOD = function(fn){
    if(fn){
        fn.call(this);
        this.onclick=null;
        var that = this;  var btn = $(this);
        var oc=btn.attr(\'class\');
        btn.attr("disabled", "disabled");
        window.setTimeout(
                function(){
                        that.onclick=BTN_METHOD;
                        btn.removeAttr("disabled");
                },1000.0);
    }
}

//使用方法

$("#SubmitID").click(function() {
        BTN_METHOD.call(this,function(){
           <!-- 具体的方法-->
          
        });
    });

分类:

技术点:

相关文章:

  • 2021-11-03
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2021-11-03
  • 2021-12-25
  • 2022-12-23
  • 2021-11-03
猜你喜欢
  • 2021-11-03
  • 2021-11-03
  • 2021-11-03
  • 2021-11-03
  • 2021-11-03
  • 2021-11-17
  • 2021-11-03
相关资源
相似解决方案