标签:
//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(){
<!-- 具体的方法-->
});
});
标签:
原文地址:http://www.cnblogs.com/songwy/p/4390394.html