jQuery导致page_load出现问题 [英] Jquery causing problem on page_load
问题描述
大家好
我正在使用jquery来显示预算栏,该预算栏根据两个下拉列表的值显示两个处理程序.
我为此使用以下jquery代码
hello all
I am using jquery to show budget bar which show two handlers according to values of two dropdownlists.
i use following jquery code for this
<script type="text/javascript">
$(function(){
$('#<%=DropDownList1.ClientID %>, #<%=DropDownList2.ClientID %>').selectToUISlider();
$('#<%=DropDownList3.ClientID %>, #<%=DropDownList4.ClientID %>').selectToUISlider();
});
</script>
但是
dropdownlist1& DropDownList2在panel1中
DropDownList3& DropDownList5在panel2中
我在selectedindex上有一个单选按钮列表,其中更改了显示的panel1或panel2是true还是false.
我的问题是,在readiobuttonlist上刷新页面时,单击预算栏会消失.
现在,我试图在单选按钮selectedIndexchanged上调用jQuery
喜欢
ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "script", "<script type=''text/javascript''>$(''#<%=DropDownList3.ClientID %>, #<%=DropDownList4.ClientID %>'').selectToUISlider();</script>", true);
但它不起作用
请为我建议解决方案.
but
dropdownlist1 & DropDownList2 are in panel1
DropDownList3 & DropDownList5 are in panel2
i have a radiobuttonlist on selectedindexchanged of which panel1 or panel2 visible''s get true or false.
My problem is that when page refresh on readiobuttonlist click budget bar disappear.
Now i am trying to call jquery on radio buttons selectedindexchanged
like
ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "script", "<script type=''text/javascript''>$(''#<%=DropDownList3.ClientID %>, #<%=DropDownList4.ClientID %>'').selectToUISlider();</script>", true);
but it is not working
Please suggest me solution for this.
Thanks.
推荐答案
(function(){
(function(){
('#< % = DropDownList1.ClientID %> ,#<% = DropDownList2.ClientID %> ').selectToUISlider();
('#<%=DropDownList1.ClientID %>, #<%=DropDownList2.ClientID %>').selectToUISlider();
('#<% = DropDownList3.ClientID %> ,#<% = DropDownList4.ClientID %> ').selectToUISlider(); }); < /script >
('#<%=DropDownList3.ClientID %>, #<%=DropDownList4.ClientID %>').selectToUISlider(); }); </script>
但是
dropdownlist1& DropDownList2在panel1中
DropDownList3& DropDownList5在panel2中
我在selectedindex上有一个单选按钮列表,其中更改了显示的panel1或panel2是true还是false.
我的问题是,在readiobuttonlist上刷新页面时,单击预算栏会消失.
现在,我试图在单选按钮selectedIndexchanged上调用jQuery
喜欢
ScriptManager.RegisterClientScriptBlock(this,typeof(Page),"script",< script type =''text/javascript''>
but
dropdownlist1 & DropDownList2 are in panel1
DropDownList3 & DropDownList5 are in panel2
i have a radiobuttonlist on selectedindexchanged of which panel1 or panel2 visible''s get true or false.
My problem is that when page refresh on readiobuttonlist click budget bar disappear.
Now i am trying to call jquery on radio buttons selectedindexchanged
like
ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "script", "<script type=''text/javascript''>
这篇关于jQuery导致page_load出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!