我正在使用 jquery-1.7.2.min.js
我收到类型错误:
$("#TextBox1").removeattr is not a function [Break On This Error]
$("#TextBox1").removeattr("disabled");
为什么?
我正在使用 jquery-1.7.2.min.js
我收到类型错误:
$("#TextBox1").removeattr is not a function [Break On This Error]
$("#TextBox1").removeattr("disabled");
为什么?
正确的函数名称是removeAttr(),而不是removeattr:
$("#TextBox1").removeAttr("disabled");
但从 jQuery 1.6 开始,最好使用.prop()设置原生属性的方法,例如disabled和checked:
$('#TextBox1').prop('disabled', false);
尝试这个
$("#TextBox1").removeAttr("disabled");
正确的函数名称是removeAttr(),而不是removeattr():
$("#TextBox1").removeAttr("disabled");
这是骆驼案。