下拉菜单中的图片 [英] Images in dropdown
本文介绍了下拉菜单中的图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想根据值的类别在下拉列表中的数据之前显示图像.
I want to dispaly image before the data in the dropdown based on the category of the value. Is it possible to do?
推荐答案
是的,但是没有下拉菜单.您将必须创建自己的控件,即一个滚动div,该控件将显示为显示图像.您可能可以使用中继器来生成它,或者可能必须编写包括数据绑定在内的所有代码.
Yes, but not with a drop down. You''d have to create your own control, a scrolling div that gets shown to show the images. You may be able to use a repeater to generate it, or you may have to write all the code, including databinding.
您不需要重新发明轮子,有很多jQuery/java插件已经可以使用了.
您可以检查以下jQuery插件
http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/jquery-image-dropdown-2.1/index.html [ http://plugins.jquery.com/project/image-combobox [
You don''t need to reinvent the wheel there are lots of jQuery/java plugins already available for this.
You can check following jQuery plugins
http://www.marghoobsuleman.com/mywork/jcomponents/image-dropdown/jquery-image-dropdown-2.1/index.html[^]
http://plugins.jquery.com/project/image-combobox[^]
我已经看到了此插件.我在数据集中有数据.基于数据的类别,我需要显示图像.可能吗.下拉菜单可以是任何否,具体取决于上一个下拉菜单的选择.
i already saw this plugin. I am having the data in the dataset. based on the data''s category i need to display the image. is it possible. the dropdown can be any no, based on the selection of the previous dropdown.
这篇关于下拉菜单中的图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文