且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在< option>中添加span标签和样式它

更新时间:2023-12-05 09:17:46

这将取决于您的网络浏览器。在最新版本的Firefox中,它工作正常。但是,它不能在最新版本的Internet Explorer中使用。

This will depend on your web browser. In the latest version of Firefox, it works fine. However, it doesn't work in the latest version of Internet Explorer.

您的问题有点加载 - 我怀疑这就是为什么它downvoted - 你问为什么

Your question is a bit loaded - and I suspect that's why it got downvoted - you are asking why it's not working, rather than how to get it to work.

它不工作,因为它不是真正的selectboxes支持的功能(尚未!)

It's not working because it's not really a supported feature of selectboxes (yet!)

我建议您使用JavaScript来实现相同的结果(具体来说, jQuery UI selectmenu ),它应该支持这种类型的'高级'选择框。

I'd suggest you look into using JavaScript to achieve the same result (and specifically, the jQuery UI selectmenu) which should support this type of 'advanced' select box.