列表框使用jquery选择的值 [英] list box selected values using jquery
本文介绍了列表框使用jquery选择的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我想在asp.net中使用jquery找到所选值的列表框可以帮助任何身体吗?
紧急吗?
先谢谢
解决方案
检查这个< br $> b $ b
http:// stackoverflow .com / questions / 3297174 / jquery-any-item-selected-in-listbox [ ^ ]
http://stackoverflow.com/questions/3113851/selecting-item-from-asp-net-listbox-using-jquery [ ^ ]
这里是代码
< div >
< asp:ListBox ID = ListBox1 runat = 服务器 宽度 = 50px 高度 = 100px
SelectionMode = 多个 >
< asp:ListItem 值 = 一个 > 1 < / asp:ListItem >
< asp:ListItem 价值 = 两个 > 2 < / asp:ListItem >
< asp:ListItem 值 = 第三个 > 3 < / asp:ListItem >
< asp:ListItem 值 =四 > 4 < / asp:ListItem >
< asp:ListItem 值 = 五 > 5 < / asp:ListItem >
< / asp:ListBox >
< br / >
< asp:TextBox ID = text1 runat = server > < / asp:TextBox >
< / div >
< pre lang =xml> < script 类型 = text / javascript >
(#<% = ListBox1.ClientID %> )。change(function(){
(#<% = text1.ClientID %> )。val(
Hi Everybody ,
I want to findout the list box selected values in asp.net using jquery can any body help?
its urgent?
Thanks in Advance
解决方案
check this
http://stackoverflow.com/questions/3297174/jquery-any-item-selected-in-listbox[^]
http://stackoverflow.com/questions/3113851/selecting-item-from-asp-net-listbox-using-jquery[^]
Here is the code
<div> <asp:ListBox ID="ListBox1" runat="server" Width="50px" Height="100px" SelectionMode="Multiple"> <asp:ListItem Value="One">1</asp:ListItem> <asp:ListItem Value="Two">2</asp:ListItem> <asp:ListItem Value="Third">3</asp:ListItem> <asp:ListItem Value="Four">4</asp:ListItem> <asp:ListItem Value="Five">5</asp:ListItem> </asp:ListBox> <br /> <asp:TextBox ID="text1" runat="server"></asp:TextBox> </div>
<script type="text/javascript">
("#<%=ListBox1.ClientID %>").change(function () {
("#<%=text1.ClientID %>").val(
这篇关于列表框使用jquery选择的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文