本文介绍了使用jquery组合框时不触发SelectedIndexChanged的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我有一个带有ComboBox的表单,它提供了一个带有db的加载值的下拉列表。 现在问题是当我从组合框中选择一个值时,事件dllTest_SelectedIndexChanged没有从后面的代码触发。 < asp:DropDownList ID = dllTest runat = server AutoPostBack = true OnSelectedIndexChanged = dllTest_SelectedIndexChanged > 和我从jquery调用组合框 $(#<%=dllTest.ClientID%>)。combobox(); 我试过 $('#dllTest')。combobox(); 并添加下拉列表的属性ClientIDMode =Static但仍无法正常工作解决方案 (#<% = dllTest.ClientID%>)。combobox(); 我试过 ('#dllTest')。combobox(); 并添加下拉ClientIDMode =静态的属性仍然无效 你好。 删除所有的javascript代码,在调试模式下看到事件发生了什么。 mybe它是因为javascript代码。 I have a form with a ComboBox that provides a dropdownlist with loaded values from db.Now the problem is when I am selecting a value from the combobox, the event dllTest_SelectedIndexChanged is not firing from code behind.<asp:DropDownList ID="dllTest" runat="server" AutoPostBack="true" OnSelectedIndexChanged="dllTest_SelectedIndexChanged">and I am calling the combobox from a jquery$("#<%=dllTest.ClientID%>").combobox();I tried $('#dllTest').combobox(); and add the property of the dropdown ClientIDMode="Static" and still not working 解决方案 ("#<%=dllTest.ClientID%>").combobox();I tried ('#dllTest').combobox(); and add the property of the dropdown ClientIDMode="Static" and still not workinghi there.remove all javascript codes and in the debug mode see event whats happen.mybe it because of javascript codes. 这篇关于使用jquery组合框时不触发SelectedIndexChanged的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-27 21:57