开发者

Selectbox image

How can I simple add image to selectbox? I found few jQuery plugins, but they very large. I need something simple. Just add image to option.开发者_StackOverflow社区

Thanks.


There's no cross-browser compatible way of doing it purely with HTML, the specs don't allow an image in the OPTION content. I'm pretty certain only text nodes are allowed.

Using javascript and an unordered list (which can contain non-text nodes), or similar, to mimic a select box is the best (and perhaps only) real solution to my knowledge.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜