gpt4 book ai didi

html - 如何更改 IE 中禁用按钮的文本颜色?

转载 作者:太空宇宙 更新时间:2023-11-04 15:09:22 25 4
gpt4 key购买 nike

我想弄清楚是否有办法更改 IE 中禁用按钮的文本颜色。使用下面的代码,文本颜色在 Firefox/Chrome 中是合适的,但在 IE 中没有效果:

<html>
<head>
<style>
button[disabled] {
color:#933;
}
</style>
</head>
<body>
<button type="submit" disabled="disabled">Sample Button</button>
</body>
</html>

这里可能有什么问题或任何替代方法的任何建议都会有所帮助。

最佳答案

或者你可以试试这段javascript代码

 $('input:button[disabled=true],input:submit[disabled=true]').each(function() {  
$(this).addClass("commandExButtonDisabled");
});

关于html - 如何更改 IE 中禁用按钮的文本颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21771266/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com