如何使用Jquery启用DropdownList [英] How to Enable the DropdownList using Jquery

查看:71
本文介绍了如何使用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>



(文档).ready(函数(){
(document).ready(function(){


(" ).clck(函数(){ // 此处检查单选按钮的文本.使用调试器 如果()// 如果文本是体验" {
(".radClass").clck(function(){ //Here check the text of radio button. use debugger if()// if text is Experience {


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

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