本文介绍了使用JQuery发起按钮单击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是JQuery的新手,正在尝试在事务成功后执行按钮单击.
I am very new to JQuery and am trying to perform a button click after a transaction is succesful.
function NewTxOkay() {
$get("btnSearch").click();
}
</script>
当行$get("btnSearch").click();
运行时出现错误Microsoft JScript运行时错误:"null"为null或不是对象
从这里调用NewTxOkay函数:
When the line $get("btnSearch").click();
is run I get an error Microsoft JScript runtime error: ''null'' is null or not an object
The NewTxOkay function is called from here:
<asp:Button ID="btnAddNew" runat="server" Text="Create Tx"/>
<AJAX:ModalPopupExtender ID="ModalPopupExtender1" BackgroundCssClass="ModalPopupBG"
runat="server" CancelControlID="btnCancel" OkControlID="btnOkay" TargetControlID="btnAddNew"
PopupControlID="Panel1" Drag="true" PopupDragHandleControlID="PopupHeader" önOkScript="NewTxOkay();">
推荐答案
当行
When the line
<asp:Button ID="btnAddNew" runat="server" Text="Create Tx"/>
<AJAX:ModalPopupExtender ID="ModalPopupExtender1" BackgroundCssClass="ModalPopupBG"
runat="server" CancelControlID="btnCancel" OkControlID="btnOkay" TargetControlID="btnAddNew"
PopupControlID="Panel1" Drag="true" PopupDragHandleControlID="PopupHeader" önOkScript="NewTxOkay();">
任何帮助将不胜感激
Any help would be greatly appreciated
这篇关于使用JQuery发起按钮单击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!