内容简介:翻译自:https://stackoverflow.com/questions/5276180/i-cant-click-on-an-aspbutton-if-it-is-hidden-using-jquery
我找到了StackOverFlow的答案和其他资源,说你可以点击一个隐藏的ASP:按钮与jQuery by
$("#<%=HiddenButton.ClientID%>").click();
要么
$("#<%=HiddenButton.ClientID%>").trigger("click");
但是,这些都不适用于我,除非按钮是Visible =“true”
这是按钮:
<asp:Button ID="loadCustomerContacts" runat="server" OnClick="loadCustomerContacts_Click" visible="false" />"
如果将Visible属性设置为false;通常在.net中,在处理页面后,控件不会在HTML输出中呈现.因此,就jQuery而言,该按钮不存在.
您可以在页面上执行查看源来验证这一点.
如果您想这样做,而不是使用Visible属性,您可以执行以下操作:
<asp:Button ID="myButton" runat="server" style="visibility: hidden; display: none;" />
或者你可以为它分配一个隐藏它的CSS类.
翻译自:https://stackoverflow.com/questions/5276180/i-cant-click-on-an-aspbutton-if-it-is-hidden-using-jquery
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Algorithms for Image Processing and Computer Vision
Parker, J. R. / 2010-12 / 687.00元
A cookbook of algorithms for common image processing applications Thanks to advances in computer hardware and software, algorithms have been developed that support sophisticated image processing with......一起来看看 《Algorithms for Image Processing and Computer Vision》 这本书的介绍吧!