js——button禁用/启用
搬运自:https://blog.csdn.net/SonaEx/article/details/80879061
禁用:
$("#id").attr("disabled","true"); $("#id").attr("disabled",true); $("#id").attr("disabled","disabled");
启用:
$("#id").removeAttr("disabled"); $("#id").attr("disabled",false); //我的项目中表单提交后用此方法无效
注:
1. $("#id").attr("disabled","false");不起作用
2. disabled只能禁用button,对超链接不起作用