[英]adding additional javascript after postback on updatePanel
Im using updatePanel and after postback which updates it I would like to add some javascript to the page which would execut after all javascript run which is specified on我正在使用 updatePanel 并在更新它的回发之后我想添加一些 javascript 到页面中,该页面将在所有 javascript 运行后执行
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(MyJSFunc);
Thanks for any hint how to do that感谢任何提示如何做到这一点
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function(){
MyJSFunc.apply(this, arguments);
MyJSFuncAfterEndRequestFunc.apply(this, arguments);
});
Have a look at the ScriptManager.RegisterClientScriptBlock Method .看看ScriptManager.RegisterClientScriptBlock 方法。 With this you can add in javascript to your page after the postback.
有了这个,您可以在回发后将 javascript 添加到您的页面。
I had a similar question the other day, Execute JQuery after ASP.Net Microsoft AJAX前几天我有一个类似的问题, 在 ASP.Net Microsoft AJAX 之后执行 JQuery
I think the answer provided by trelston is what you are looking for.我认为 trelston 提供的答案就是您要寻找的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.