开发者

HTML Select, embed object with text?

开发者 https://www.devze.com 2023-01-15 14:06 出处:网络
Is it possible to have a HTML Select containing elements, not just text values but say an object (specifically i开发者_StackOverflow社区\'d like to add a JQuery slider with the text) but if someone co

Is it possible to have a HTML Select containing elements, not just text values but say an object (specifically i开发者_StackOverflow社区'd like to add a JQuery slider with the text) but if someone could advice me generally how to do this, i could investigate.


No, definitely not. The default select element is rendered by the browser and can not be extended beyond its standard behaviour.

You would need to look into entirely JavaScript-powered SELECT alternatives.

Here's a small list of jQuery based SELECT alternatives; there are many, many more.


If you want to do this, don't use an HTML select element. Use a div or whatever, and implement the whole thing in javascript. Then you can add whatever functionality you like.

0

精彩评论

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