Jquery 按钮的禁用
("#id")..attr({"disabled":"disabled"});
Jquery按钮的启用
("#id").removeAttr("disabled");
JavaScript 按钮的禁用
document.getElementById("#id").disabled=true;
JavaScript 按钮的启用
document.getElementById("#id").disabled=false;
禁用时间设置
资料:
js setTimeout参数传递使用介绍 http://www.jb51.net/article/40524.htm
介绍Windows setTimeout()方法 http://www.runoob.com/jsref/met-win-settimeout.html
备注:setTimeout() 只执行 code 一次。如果要多次调用,请使用 setInterval() 或者让 code 自身再次调用 setTimeout()。
Jquery a标签的禁用
法一:$("#id").removeAttr("href");
法二:$("#id").attr("href","#");
$("#id").click(function(event){
event.preventDefault();//if the target="_blank",this code need to add.
});
Jquery a标签click事件
可以通过添加flag禁用启用。