最新消息: 新版网站上线了!!!

js和jquery使按钮失效的方法

js和jquery使按钮失效的方法
设置disabled属性为true即为不可用状态。
JS:
document.getElementByIdx("btn").disabled=true;
 
jquery
$("#btn").attr("disabled"true);
 
html:
<input type="button" value="提交" id="btn">

转载请注明:谷谷点程序 » js和jquery使按钮失效的方法