开发者

enable/disable checkbox in IE

开发者 https://www.devze.com 2023-04-04 06:36 出处:网络
i want to enable/disable checkbox开发者_StackOverflow using jQuery. I am using $(\"#checkbox\").attr(\"disabled\", true);

i want to enable/disable checkbox开发者_StackOverflow using jQuery. I am using

$("#checkbox").attr("disabled", true);

This works fine in FF but not in IE.


$("#checkbox").attr("disabled", "disabled");

is correct and better


$("#checkbox").attr("disabled", "disabled");

or if you are using jquery 1.6+

$("#checkbox").prop("disabled", true);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号