列表框控件属性 [英] ListBox Control Properties

查看:68
本文介绍了列表框控件属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我只想在列表框中选择两个值,但通过多次选择没有选择的限制.

Hi
I want to select only two value in listbox but by multiple selection there is no limit of selection.

推荐答案

您可以在onchange事件中编写javascript可以计算元素在选择了2个元素之后选择了哪个,您可以禁用该列表框
这对您有帮助
http://stackoverflow.com/questions/1380148/等效于onselect-javascript-hook-in-multi-select-asp-listbox [
You can write javascript in that onchange event You can count the elements which selected after 2 elements selected you can disable that listbox
this will help you
http://stackoverflow.com/questions/1380148/equivalent-of-onselect-javascript-hook-in-multi-select-asp-listbox[^]


这篇关于列表框控件属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆