【www.gdgbn.com--jquery】
$("#button").attr("disabled","true");添加disabled属性
$("#button").removeattr("disabled"); 移除disabled属性
在html标签中设置按钮被禁用,可以使用如下代码
在jquery中可以使用attr()函数修改按钮的disable属性
$(“#test”).attr(‘disabled’,false);
看一款完整实例代码
<script src="http://code.jquery.com/jquery-1.4.4.js"></script>
<script>$("input:disabled").val("this is it");</script>