函数WebForm_PostBackOptions(eventTarget、eventArgument、validation、validationGroup、actionUrl、trackFocus、clientSubmit){this.eventTarget=eventTarget;this.eventArgument=eventArgument;this.validationGroup=validationGroup;this.actionUrl=actionUrl;this.trackFocus=trackFocus;this.clientSubmit=clientSubmit;}函数WebForm_DoPostBackWithOptions(options){var validationResult=true;if(options.validation){if(typeof(Page_ClientValidate)==“function”){validationResult=Page_ClientValidate(options.validationGroup);}}if(validationResult){if((typeof(options.actionUrl)!=“undefined”)&&(options.actionUrl!=null)&(options.actionUrl.length>0)){theForm.action=options.actionUrl;}if(options.trackFocus){var lastFocus=theForm.elements)[“uu LASTFOCUS”];if((typeof(LASTFOCUS)!=“未定义的”)&(LASTFOCUS!=null)){if(typeof(document.activeElement)=“未定义的”){LASTFOCUS.value=options.eventTarget;}else{var active=document.activeElement;if((typeof(active)!=“未定义的”)&(active!=null)){if((typeof(active.id)!“未定义的”)&(active.id)&&(active.id.length>0)){lastFocus.value=active.id;}else if(typeof(active.name)!=“undefined”){lastFocus.value=active.name;}}}}}}if(options.clientSubmit){doPostBack(options.eventTarget,options.eventArgument);}var_upendingCallbacks=new Array();var_usynchronousCallbackindex=-1;函数WebForm_DoCallback(eventTarget、eventArgument、eventCallback、context、errorCallback、useanc){var postData=uu theFormPostData+“uu CALLBACKID=“+WebForm_uencodecallback(eventTarget)+”和uuu CALLBACKPARAM=“+WebForm_uencodecallback(eventArgument);if(theForm[“uuuu EVENTVALIDATION”]){postData+=”和uuu EVENTVALIDATION=“+WebForm EncodeCallback(theForm[”__EVENTVALIDATION“].value);}var xmlRequest,e;try{xmlRequest=new XMLHttpRequest();}catch(e){try{xmlRequest=new ActiveXObject(“Microsoft.XMLHTTP”);}catch(e){}var setRequestHeaderMethodExists=true;try{setRequestHeaderMethodExists=(xmlRequest&&xmlRequest.setRequestHeader);}catch(e){var callback=new Object();callback.eventCallback=eventCallback;callback.context=context;callback.errorCallback=errorCallback;callback.async=useAsync;var callbackIndex=WebForm\u FillFirstAvailableSlot(uu pendingCallbacks,callback);if(!useannc){if(u synchronousCallBackIndex!=-1){uu pendingCallbacks[u synchronousCallBackIndex]=null;}_uusynchronouscallbackindex=callbackIndex;}if(setRequestHeaderMethodExists){xmlRequest.onreadystatechange=WebForm\u CallbackComplete;callback.xmlRequest=xmlRequest;//例如http:var action=theForm.action | | | document.location.pathname,fragmentIndex=action.indexOf('.#');if(fragmentIndex!=-1){action=action.substr(0,fragmentIndex);}if(!u NonsDomBrowser){var domain=“”;var path=action;var query=“”;var queryIndex=action.indexOf('?');if(queryIndex!==-1){query=action.substr(queryIndex);path=action.substr(0,queryIndex);}if(path.indexOf(“%”)==-1){//域可能存在,也可能不存在(例如,“foo.aspx”的操作vs“http:if(/^https?\:\/\/.$/gi.test(path)){var-domainPartIndex=path.indexOf(“\/\/”)+2;var-slashAfterDomain=path.indexOf(“/”,domainPartIndex);if(slashAfterDomain===-1){//整个url是域(例如:“http:domain=path;path=”“;}否则{domain=path.substr 0,slashAfterDomain);path=path.substr(slashAfterDomain);}action=domain+encodeURI(path)+query;}}}xmlRequest.open(“POST”,action,true);xmlRequest.setRequestHeader(“内容类型”,“应用程序/x-www-form-urlencoded;charset=utf-8”);xmlRequest.send(postData);return;}callback.xmlRequest=new Object();var callbackFrameID=“\u CALLBACKFRAME+callbackIndex;var xmlRequestFrame=document.frames[callbackFrameID];if(!xmlRequestFrame){xmlRequestFrame=document.createElement(“IFRAME”);xmlRequestFrame.width=“1”;xmlRequestFrame.height=“1”;xmlRequestFrame.frameBorder=“0”;xmlRequestFrame.id=callbackFrameID;xmlRequestFrame.name=callbackFrameID;xmlRequestFrame.style.position=“绝对”;xmlRequestFrame.style.top=“-100px”xmlRequestFrame.style.left=“-100px”;尝试{if(callBackFrameUrl){xmlRequestFrame.src=callBackFrameUrl;}catch(e){}document.body.appendChild(xmlRequestFrame);}var interval=window.setInterval(function(){xmlRequestFrame=document.frames[callbackFrameID];if(xmlRequestFrame&&xmlRequestFrame.document){window.clearInterval(interval);xmlRequestFrame.document.write(“”);xmlRequestFrame.document.close();xmlRequestFrame.document.write(“”)
'); xmlRequestFrame.document.close();xmlRequestFrame.document.forms[0]。action=theForm.action;var count=u theFormPostCollection.length;var元素;对于(var i=0;i= 0) { element.className = WebForm_TrimString(currentClassName.substring(0, index) + ' ' + currentClassName.substring(index + className.length + 1, currentClassName.length)); } } function WebForm_GetElementById(elementId) { if (document.getElementById) { return document.getElementById(elementId); } else if (document.all) { return document.all[elementId]; } else return null; } function WebForm_GetElementByTagName(element, tagName) { var elements = WebForm_GetElementsByTagName(element, tagName); if (elements && elements.length > 0) { return elements[0]; } else return null; } function WebForm_GetElementsByTagName(element, tagName) { if (element && tagName) { if (element.getElementsByTagName) { return element.getElementsByTagName(tagName); } if (element.all && element.all.tags) { return element.all.tags(tagName); } } return null; } function WebForm_GetElementDir(element) { if (element) { if (element.dir) { return element.dir; } return WebForm_GetElementDir(element.parentNode); } return "ltr"; } function WebForm_GetElementPosition(element) { var result = new Object(); result.x = 0; result.y = 0; result.width = 0; result.height = 0; if (element.offsetParent) { result.x = element.offsetLeft; result.y = element.offsetTop; var parent = element.offsetParent; while (parent) { result.x += parent.offsetLeft; result.y += parent.offsetTop; var parentTagName = parent.tagName.toLowerCase(); if (parentTagName != "table" && parentTagName != "body" && parentTagName != "html" && parentTagName != "div" && parent.clientTop && parent.clientLeft) { result.x += parent.clientLeft; result.y += parent.clientTop; } parent = parent.offsetParent; } } else if (element.left && element.top) { result.x = element.left; result.y = element.top; } else { if (element.x) { result.x = element.x; } if (element.y) { result.y = element.y; } } if (element.offsetWidth && element.offsetHeight) { result.width = element.offsetWidth; result.height = element.offsetHeight; } else if (element.style && element.style.pixelWidth && element.style.pixelHeight) { result.width = element.style.pixelWidth; result.height = element.style.pixelHeight; } return result; } function WebForm_GetParentByTagName(element, tagName) { var parent = element.parentNode; var upperTagName = tagName.toUpperCase(); while (parent && (parent.tagName.toUpperCase() != upperTagName)) { parent = parent.parentNode ? parent.parentNode : parent.parentElement; } return parent; } function WebForm_SetElementHeight(element, height) { if (element && element.style) { element.style.height = height + "px"; } } function WebForm_SetElementWidth(element, width) { if (element && element.style) { element.style.width = width + "px"; } } function WebForm_SetElementX(element, x) { if (element && element.style) { element.style.left = x + "px"; } } function WebForm_SetElementY(element, y) { if (element && element.style) { element.style.top = y + "px"; } }