I am using jQuery 1.3.2, It seems the attr function does work in IE8 and FF 3 but not in IE7开发者_如何学编程.
The problematic code:
.attr("disabled",true)
or
.attr("disabled","disabled")
Is there an alternative way to disable an element? (a specific option in a SELECT element)
Thank you.
IE 7 does not support disabled
in select options. It's not a jQuery issue.
There's detailed info in this blog post.
There are Javascript based workarounds like this one that add the functionality (however, even they are not able to give the select the greyed-out look.)
精彩评论