怎么可能加载jQuery的文件,具体的更新面板加载后?加载、面板、具体、文件

2023-09-10 18:58:42 作者:爱我你就啪啪我^3

我已经设置了的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.
}

您可以添加在En​​dRequest一个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/