应用样式=“display:none”在< option>不在IE中工作,但在Mozilla工作 [英] Applied style="display:none" in <option> not working in IE but working Mozilla

查看:55
本文介绍了应用样式=“display:none”在< option>不在IE中工作,但在Mozilla工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在(例如< option value =testid =teststyle =display:none;> test<选项> ),这在Mozilla中工作得很好,但在IE中没有。有谁知道那里出了什么问题?另外,无论如何,我可以在< option> ??中应用样式显示none。

I have tried to apply style="display:none" in (e.g <option value="test" id="test" style="display:none;">test</option>), this is working perfectly fine in Mozilla but not in IE. Does anyone know what is going wrong there? Also, anyway that I can apply the style display none in <option> ??

推荐答案

没有什么是错的;这就是IE的行为方式。您可以对单个选项做的样式不多。

Nothing is going wrong; that is the way IE behaves. There is not a lot of styling you can do to individual options.

如果您不想使用JavaScript,最好从选择元素中完全删除选项显示在选择。

It's probably best to remove the option from the select element entirely using JavaScript if you don't want it shown in the select.

这篇关于应用样式=“display:none”在&lt; option&gt;不在IE中工作,但在Mozilla工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆