1) 页面里有 UPDATEPANEL
2) 是用JS弹出一个模态窗体,然后点确定后出现的
调试后发现是这个函数中的:Sys._ScriptLoaderTask._clearScript(scriptElement); 报错
全部函数如下:
function Sys$_ScriptLoader$_loadScriptsInternal() {
var session = this._currentSession;
if (session.scriptsToLoad && session.scriptsToLoad.length > 0) {
var nextScript = Array.dequeue(session.scriptsToLoad);
var scriptElement = this._createScriptElement(nextScript);
if (scriptElement.text && Sys.Browser.agent === Sys.Browser.Safari) {
scriptElement.innerHTML = scriptElement.text;
delete scriptElement.text;
}
if (typeof(nextScript.src) === "string") {
this._currentTask = new Sys._ScriptLoaderTask(scriptElement, this._scriptLoadedDelegate);
this._currentTask.execute();
}
else {
var headElements = document.getElementsByTagName('head');
if (headElements.length === 0) {
throw new Error.invalidOperation(Sys.Res.scriptLoadFailedNoHead);
}
else {
headElements[0].appendChild(scriptElement);
}
Sys._ScriptLoaderTask._clearScript(scriptElement);
this._loadScriptsInternal();
}
}
else {
this._stopSession();
var callback = session.allScriptsLoadedCallback;
if(callback) {
callback(this);
}
this._nextSession();
}
}
哇,好复杂啊。我一般不会用微软这套语法,除非用了Ajax控件,万不得已写一两句,这个调试确实很复杂。 一般都用Jquery。