记录ICallbackEventHandler 同时并发访问容易引发的问题

    xiaoxiao2022-07-09  221

    如果多个脚本同时定时访问,容易引发脚本异常,没下就记下来了。

     

    </ script > < script type = " text/javascript " > function WebForm_CallbackComplete_SyncFixed() {    for  (var i  =   0 ; i  <  __pendingCallbacks.length; i ++ ) {    callbackObject  =  __pendingCallbacks[ i ];    if  (callbackObject  &&  callbackObject.xmlRequest  &&  (callbackObject.xmlRequest.readyState  ==   4 )) {      if  ( ! __pendingCallbacks[ i ].async) {      __synchronousCallBackIndex  =   - 1 ;    }    __pendingCallbacks[i]  =   null ;    var callbackFrameID  =   " __CALLBACKFRAME "   +  i;    var xmlRequestFrame  =  document.getElementById(callbackFrameID);     if  (xmlRequestFrame) {      xmlRequestFrame.parentNode.removeChild(xmlRequestFrame);    }    WebForm_ExecuteCallback(callbackObject);   }  } } window.onload  =  function(){ if  ( typeof  (WebForm_CallbackComplete)  ==   " function " ) {   WebForm_CallbackComplete  =  WebForm_CallbackComplete_SyncFixed; }} </ script >

     

    版权声明:本文原创发表于博客园,作者为路过秋天,原文链接:

    http://www.cnblogs.com/cyq1162/archive/2010/04/02/1702978.html

    相关资源:敏捷开发V1.0.pptx
    最新回复(0)