怎么可能加载jQuery的文件,具体的更新面板加载后? [英] How is it possible to load jquery files after a specific update panel has been loaded?
本文介绍了怎么可能加载jQuery的文件,具体的更新面板加载后?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经设置了的jQuery
files.like这样的:
I have set of jquery
files.like this :
<script src="js/PortalJs/jquery-ui-personalized-1.6rc2.min.js" type="text/javascript"></script>
<script src="js/PortalJs/inettuts.js" type="text/javascript"></script>
这怎么可能一个特定的更新面板加载后调用这些文件。
How is it possible to call these files after a specific update panel has been loaded.
推荐答案
为了让JavaScript的方来电后,更新面板加载你用这个标准code。
To make calls on javascript side after the update panel loaded you use this standard code.
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_initializeRequest(InitializeRequest);
prm.add_endRequest(EndRequest);
function InitializeRequest(sender, args) {
}
function EndRequest(sender, args) {
// here you can load your scripts.
}
您可以添加在EndRequest一个code加载的JavaScript,但照顾加载它唯一的。如果jQuery的有冲突,请尝试jQuery.noConflict()命令。 http://api.jquery.com/jQuery.noConflict/
You can add at the EndRequest a code that loads the javascript, but take care to load it only ones. If the jQuery have conflicts try the jQuery.noConflict() command. http://api.jquery.com/jQuery.noConflict/
这篇关于怎么可能加载jQuery的文件,具体的更新面板加载后?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文