母版页dropdownlist在jquery中不起作用? [英] Master page dropdownlist doesnt work in jquery?
本文介绍了母版页dropdownlist在jquery中不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
朋友们!
我在Web应用程序中工作...总是在服务器端控件的麻烦主页....我需要在单击下拉列表时禁用一些按钮...但它不起作用...
任何人都可以帮我解决这个问题...
这是代码之一:
hi friends!!
im working in web application... always trouble master page with server side control.... i need disable some buttons when im clicking dropdownlist... but its not work...
any one pls help me out this...
here is one of the code:
<asp:DropDownList ID="DropDownList1" runat="server" Width="75px">
<asp:ListItem Value="*">Select</asp:ListItem>
<asp:ListItem Value="Route">Route</asp:ListItem>
<asp:ListItem Value="Bus No">Bus No</asp:ListItem>
<asp:ListItem Value="Shift">Shift</asp:ListItem>
<asp:ListItem Value="Conductor">Conductor</asp:ListItem>
<asp:ListItem Value="Driver">Driver</asp:ListItem>
</asp:DropDownList>
$(document).ready(function(){
var $information=$("#lbl_Info");
$("#DropDownList1").change(function() {
alert('hi im Work');
if ($('#selNoOfStudentRecords').val() == "*")
{
$("#Button1").attr("disabled", true);
$("#Button1").removeClass("ButtonStyle");
$("#Button1").addClass("ButtonDisabled");
$("#Button2").attr("disabled", true);
$("#Button2").removeClass("ButtonStyle");
$("#Button2").addClass("ButtonDisabled");
$information.html("Please Select Your Options");
} else {
$("#Button1").attr("disabled", false);
$("#Button1").removeClass("ButtonDisabled");
$("#Button1").addClass("ButtonStyle");
$("#Button2").attr("disabled", false);
$("#Button2").removeClass("ButtonDisabled");
$("#Button2").addClass("ButtonStyle");
$information.html("Your Option Selected");
}
}).change();
});
问候
sarva
regards
sarva
推荐答案
(document).ready(function(){ var
(document).ready(function(){ var
information =
information=
(" #lbl_Info");
这篇关于母版页dropdownlist在jquery中不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文