Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用的是 jQuery 1.3.2,似乎 attr 函数在 IE8 和 FF 3 中有效,但在 IE7 中无效。
有问题的代码:
.attr("disabled",true)
或者
.attr("disabled","disabled")
是否有其他方法可以禁用元素?(SELECT 元素中的特定选项)
谢谢你。
IE 7 不支持disabled选择选项。这不是 jQuery 问题。
disabled
这篇博文中有详细信息。
有像这样的基于 Javascript 的变通方法可以添加功能(但是,即使它们也无法为选择提供灰色外观。)