开发者

Showing image in SELECT element

开发者 https://www.devze.com 2023-02-17 01:41 出处:网络
For example: <code> <select> <option>1</option> <option>2</option> <option>3</option>

For example:

<code>
<select>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
</code>

I want to use some image in place of 1, 2 or 3. But looks like it is 开发者_StackOverflow中文版not working. You Geek people, help me out of this, how can I do that? Is there any alternative solution you can provide?

thanks


What you're asking isn't possible using "straight" HTML - you'd need to use JavaScript, ideally a library such as the popular jQuery, which quite possibly has a plug-in that already does this.

As a (random) example, see http://www.marghoobsuleman.com/jquery-image-dropdown

0

精彩评论

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