简体   繁体   English

输入按钮点击不是通过 IE9 中的 JavaScript 调用的

[英]Input button click is not invoked through JavaScript in IE9

We have a hidden input button which is used to submit the form.我们有一个隐藏的输入按钮,用于提交表单。 The submit is invoked using a Javascript.使用 Javascript 调用提交。 The script is invoked on click of another button.单击另一个按钮时会调用该脚本。 The click event is invoked in IE8 (it also works fine in IE5, IE6, and IE7).在 IE8 中调用 click 事件(在 IE5、IE6 和 IE7 中也可以正常工作)。 In IE9 the click event is not getting invoked.在 IE9 中,不会调用 click 事件。 Any clue, or solution would be helpful.任何线索或解决方案都会有所帮助。

Below is the aspx and the JavaScript code of the button.下面是按钮的 aspx 和 JavaScript 代码。

<asp:Button runat="server" ID="Proceed" Style="display: none;" OnClick="btnProcedi_Click"></asp:Button>

JavaScript: JavaScript:

document.getElementById("<%=Proceed.ClientID%>").click();

Try to add "()" in ASPX:尝试在 ASPX 中添加"()"

Style="display: none;" OnClick="btnProcedi_Click();"

and also并且

document.getElementById("<%=Proceed.ClientID%>").onclick();

in Javascript在 JavaScript 中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM