提交时如何重新加载页面的所有脚本 [英] How can i reload all script of page when i submit

查看:96
本文介绍了提交时如何重新加载页面的所有脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我正在使用ASP.NET的Ajax扩展的UpdatePanel.
我不想重新加载我所有的aspx页面,所以我使用UpdatePanel,但是当< ContentTemplate> reload中的内容重新加载时,某些jquery无法正常工作,因为我在document.Ready函数中调用了某些脚本,所以我该如何重新加载这些脚本,而无需使用服务器上的Page_Load.
谢谢

Hi all,
I''m using UpdatePanel of Ajax extension of ASP.NET.
I don''t want reload all my aspx page, so i use UpdatePanel, but when content in <ContentTemplate>reload, some of jquery is not work, because some script i call in document.Ready function, so how can i reload these script without using Page_Load from server.
Thanks

推荐答案

我遇到了同样的问题,部分回发后,
I had the same problem, after partial postback, the script specified in


(document)中指定的脚本不是.ready不是已执行.

在下面添加脚本可解决此问题

(document).ready was not executed.

Adding a script below fixes the issue

<script type="text/javascript"> 
  Sys.WebForms.PageRequestManager.getInstance().add_endRequest(myReadyFunction); 
</script> 
</script>



*注意:如果适合您,别忘了将其标记为答案



*Note: Don''t forget to mark it as answer if it works for you


这篇关于提交时如何重新加载页面的所有脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆