如何使用Jquery启用DropdownList

如何使用Jquery启用DropdownList

本文介绍了如何使用Jquery启用DropdownList的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Guys, I tried but i does not get the required Answer.  I have the RadioButtonList and Two DropdownLists.
<asp:RadioButtonList ID="rbnl" runat="server" RepeatDirection="Horizontal">
                                <asp:ListItem Text="Fresher" Value="0" Selected="True"></asp:ListItem>
                                <asp:ListItem Text="Experience" Value="1"></asp:ListItem>
                            </asp:RadioButtonList>


<asp:DropDownList ID="ddlMin" runat="server" Width="70px">
                                <asp:ListItem Text="" Value="0"></asp:ListItem>
                                <asp:ListItem Text="1" Value="1"></asp:ListItem>
                                                           </asp:DropDownList>


<asp:DropDownList ID="ddlMax" runat="server" Width="70px">
                                <asp:ListItem Text="" Value="0"></asp:ListItem>
                                <asp:ListItem Text="1" Value="1"></asp:ListItem>
                                                                                                                          </asp:DropDownList>

in Page load: if selected Text of Radionbuttonlist is "Fresher" then disabled the Dropdownlist.

my requirement is using jquery i want enable the DropdownLists. when selecting the "Experience".


Please any one help me.

推荐答案

<asp:RadioButtonList class="radClas" ID="rbnl" runat="server" RepeatDirection="Horizontal">
                                <asp:ListItem Text="Fresher" Value="0" Selected="True"></asp:ListItem>
                                <asp:ListItem Text="Experience" Value="1"></asp:ListItem>
                            </asp:RadioButtonList>


<asp:dropdownlist cssclass="drpClassOne" id="ddlMin" runat="server" width="70px" xmlns:asp="#unknown">
                                <asp:listitem text="" value="0"></asp:listitem>
                                <asp:listitem text="1" value="1"></asp:listitem>
                                                           </asp:dropdownlist>

<asp:dropdownlist cssclass="drpClassTwo" id="ddlMax" runat="server" width="70px" xmlns:asp="#unknown">
                                <asp:listitem text="" value="0"></asp:listitem>
                                <asp:listitem text="1" value="1"></asp:listitem>
                                                                                                                          </asp:dropdownlist>





这篇关于如何使用Jquery启用DropdownList的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 06:02