关于dropdownlist的使用问题,在dropdownlist选择一项数据后,怎样立刻在另一个textbox显示数据库中表对应这个条件的值。应是联动功能吧。
------解决方案--------------------------------------------------------
$('#TextBox1').val($('#DropDownList1').val())
------解决方案--------------------------------------------------------
- HTML code
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" onselectedindexchanged="DropDownList1_SelectedIndexChanged"> <asp:ListItem Text="0" Value="0"></asp:ListItem> <asp:ListItem Text="1" Value="1"></asp:ListItem> <asp:ListItem Text="2" Value="2"></asp:ListItem> <asp:ListItem Text="3" Value="3"></asp:ListItem> <asp:ListItem Text="4" Value="4"></asp:ListItem> </asp:DropDownList> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
------解决方案--------------------------------------------------------
- HTML code
<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" onselectedindexchanged="DropDownList1_SelectedIndexChanged"> <asp:ListItem Text="0" Value="0"></asp:ListItem> <asp:ListItem Text="1" Value="1"></asp:ListItem> <asp:ListItem Text="2" Value="2"></asp:ListItem> <asp:ListItem Text="3" Value="3"></asp:ListItem> <asp:ListItem Text="4" Value="4"></asp:ListItem> </asp:DropDownList> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
------解决方案--------------------------------------------------------
- HTML code
<asp:DropDownList ID="DropDownList1" runat="server" > <asp:ListItem Text="0" Value="0"></asp:ListItem> <asp:ListItem Text="1" Value="1"></asp:ListItem> <asp:ListItem Text="2" Value="2"></asp:ListItem> <asp:ListItem Text="3" Value="3"></asp:ListItem> <asp:ListItem Text="4" Value="4"></asp:ListItem> </asp:DropDownList> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>