webForm-PostBackoptions事件說明驗證=驗證驗證組 = 驗證組actionell=actionell跟蹤焦點委托人Submit=委托人Submit函數WebForm_DoPostBackObjects{驗證Result=page_ClientValidates{form.action=options.actionell{vl最後焦點=Form.elementsif(sortfof(LastFocus){var主動=文檔.activeEcle{focus.value=active.id{focus.value=active.name!wrj.clientSubmit)var-unitCallbacks=新數組Var-CallBackindex=-webForm_DoCallback(事件定位)+#CALLBACKARAM=#WebFormEncollCARUT{postData+WebFormEncoccallvarxml請求e試 {xml請求=新XMLHtp請求(){{xml請求=新主動Xobject (mcrosoft.XMLHTTP)spectheadMethodExists=真{set主管MethodExists=(xml請求#xmlRequest.set請求主管)scatch(e)++var回調=新Objects回調.eventCallback=事件Callback回調.context=上下文回調.errorCallback=報錯Callback回調.async=使用Assyncvar callbackIndex = WebForm_FillFirstAvailableSlot(__pendingCallbacks, callback)!{-unitCallBackdexs同步AllBackindex =回調Index{xml請求.onstatechange=WebForm_Call回溯實現回調.xml請求=xml請求//例如網站:vor動作=Form.action+Q文檔.pathnameif(fragmentIndex!serve-{nonMSDOMBrowser}{var域名='var路徑表示動作var查詢=var查詢Index=action.indexofif.substr/queryIndex路徑=動作.substr(0,查詢Index){//域可能存在或不存在foo.aspx/ss/th/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/s/svar slapseDome=路徑.indexofif(SlashDome+++++++++++/網域=路徑路徑表示{域=路徑.substr/0路徑=路徑.substr}}動作+域+編碼URI+查詢Xml請求.openxmlRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded!charset=utf-8")!xmlRequest.send(postData)!返回回調.xml請求=新對象var回調FrameID=CALLBACKFRAME+回調Indexvar xmlExcessFrame=文檔.framesif.xmrequestframeXmlExcernFrame.width=sXmlRequestFrame.hileXmlExcessFrame.frame邊界=0XmlExcessFrame.id =回調FrameIDXmlExcessFrame.name =回調FrameIDXmlExcessFrame.styXmlExcessFrame.stype.top = "-100px"xmlExcessFrame.stype.left = "-100px"{如果backFrameurl調用{xmlRequestFrame.src =調用backFrameurlcatch-e-Q文檔.body.appendCeil-xmlrequestFramevar區間=窗口.set區間函數{xmlExcessFrame=文檔.framess[回召FrameID]{ window.Clear區間xmlRequestFrame.document.write("")!xmlRequestFrame.document.close()!xmlRequestFrame.document.write('
')!xmlRequestFrame.document.close()!xmlRequestFrame.document.forms[0].action = theForm.action!var計數=_FormPost集合.var元素Forlorissss計數++/元素=-FormPost集合{vl字段Eplement=xmlExcessFrame.document.CreateEplement(“INPUT”)字段元素類型 = hidden字段E元素.name=元素.name字段元素.value=元素.valuexmlRequestFrame.document.forms[0].appendChild(fieldElement)!var調回idFlelde元素=xmlRequestFrame.document.CreateEplement回調FriendEntle回調字段元件.name回調Id字段元素.value=事件xmlRequestFrame.document.forms[0].appendChild(callbackIdFieldElement)!var callbackParamFieldElement = xmlRequestFrame.document.createElement("INPUT")!回調ParamFriendEcallbackParamFieldElement.name = "__CALLBACKPARAM"!callbackParamFieldElement.value = eventArgument!xmlRequestFrame.document.forms[0].appendChild(callbackParamFieldElement)!{v回調域名=xmlRequestFrame.dode.CreateEplementcallbackValidationFieldElement.type = "hidden"!callbackValidationFieldElement.name = "__EVENTVALIDATION"!callbackValidationFieldElement.value = theForm["__EVENTVALIDATION"].value!xmlRequestFrame.document.forms[0].appendChild(callbackValidationFieldElement)!var調回Index元素=xmlrequestFrame.document.CreateEplement回調Flendex元素.類型=HiddencallbackIndexFieldElement.name = "__CALLBACKINDEX"!callbackIndexFieldElement.value = callbackIndex!xmlRequestFrame.document.forms[0].appendChild(callbackIndexFieldElement)!xmlRequestFrame.document.forms[0].submit()!+++10++++++++++++++++++++++++++++++++++++++++++++++++++++10+++++++++函數WebForm-CallbackComplee等待回調 長度++/調回Objectss回調Objects+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++等待回調數=無效var回調FrameIDs+ivar xmlRequestFrame = document.getElementById(callbackFrameID)!{xlrequestframe.parentNorde.removeChilewebFormExecutCallbackwebFormExecutCallback {var響應{回調Object.eventCallwhy.errorCallback/context回調Object.err{vorseatorIndex=響應.indeof{var驗證FieldLength=puseInt(響應.substring/0,separatorIndex))sparatorIndex+1驗證FieldLentth+1{v驗證字段元素=Formif(!驗證字段元素) {驗證字段元素=文檔.CreateE元素驗證FieldE元素類型=HiddenvalidationFieldElement.name = "__EVENTVALIDATION"!theForm.appendChild(validationFieldElement)!驗證字段.value=驗證字段{回調Object.eventCallwebFormFinalAbelSlot(數組,元素){variformsssl <數組.長度++/數組=元素返回ivar-nonMSDOMBrowser=VarFormPostData表示Var_FormPost集合=新數組var __callbackTextTypes = /^(text|password|hidden|search|tel|url|email|number|range|color|datetime|date|month|week|time|datetime-local)$/i!webForm_InitCallback(){vor形式Eplements=Form.elements,計數=Eplements.Forlorissss計數++ {元素=表單E元素var標簽Name=元素.tagName.tolowerCase{vor類型=元素.類型webForm-InitCalladField.name{var選擇Count=ecle.options.for(varj=0)j < selectCount++/vl選擇Child=元素.objects{WebForm_InitCallback{WebForm-InitCallbackwebForm_InitCallback名Value.name=name名value.value=value__theFormPostCollection[__theFormPostCollection.length] = nameValue!FormPostData+Encocall函數WebFormEncodeCallunte{返回越線(參數)Var-Dept控製陣列=新陣列webForm-Reable控件{var禁用Index=0Forlorissss控製陣列.長度++/varc{c=文檔.getEplementById{c=文檔.all.{c.dept=假殘疾控製陣列[殘疾Index++]ssetimout(WebForm重解控件,0)歸真函數WebForm重解控件{formi=0殘疾控製陣列.長度+++worldForm模擬Click(元素事件){vrlkEventif(element) {if(element.click) {ecle.click} else { clickEvent = document.createEvent("MouseEvents")!Event MouseEvent(clock)真實真實性、窗口000000if(!ement.dispatchEvent(clockEvent))事件.cancelble=真if(event.stopprapation){事件.stopprapation報假報歸真函數WebForm-FireDaultbutton(事件目標){if (src && ((src.tagName.toLowerCase() == "input") && (src.type.toLowerCase() == "submit" || src.type.toLowerCase() == "button")) || ((src.tagName.toLowerCase() == "a") && (src.href != null) && (src.href != "")) || (src.tagName.toLowerCase() == "textarea")) { return true!Var默認按鈕if(nonMSDOMBrowser) {默認按鈕=文檔.getEplementById{默認按鈕=文檔.all[目標]}(默認按鈕){返回WebForm_SimlateClick(默認按鈕事件)歸真函數WebFormGetScrollX{scrollleft文檔if返回文檔.bodyscrollleft返回0函數WebFormGetScrollY{sectionEclement/scellTopif返回文檔.bodyscrollTop返回0函數WebForm-SaveScrolipsimit/theForm.elements['__SCROLLPOSITIONX'].value = window.pageXOffset!{Form._scrowlitionX.value=WebForm_GetscrellXtheForm.__SCROLLPOSITIONY.value = WebForm_GetScrollY()!if(griptop(This.oldSubmit)!歸真函數WebForm-SaveScrolltheForm.__SCROLLPOSITIONY.value = WebForm_GetScrollY()!if(s類型(This.oldOnSubmit)!歸真函數WebForm-RestoreScrolipstions{窗口scrollto/soroptionX.valueif(Form.oldload)歸真函數WebFormTextBoxKeyHandler/event{nonMSDOMBrowser}{目標=事件.target{目標=事件.sclementif(griftof.onchange) {give.onchange事件.cancelble=真if (event.stopPropagation) event.stopPropagation()!偽返回歸真函數WebForm_TrimString(值){返回值.repleg/s+g+類名 = WebForm-TrimStringvar索引sName.indexof{元素類Name=類名 : 元素類名++類名}函數WebForm-reveClassName(元素類名) {vrentClassNames= '+webForm-TrimString(元素類名)+類名 = WebForm-TrimStringvar索引sName.indexof{元素類Name=WebForm_TrimString}}函數WebForm-GetElementByld/if返回文檔.all返回無效函數WebForm-GetEplementByTagName(元素標簽Name) {var元素=WebForm-GetEplementsByTagName(元素標簽Name)if(元素+++++++++++xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx返回無效函數WebForm-GetEplementsByTagName/}(元素.all.tags) {返回元素.all.tags返回無效函數WebForm/GetEplementDir/返回WebFormGetElementDir回回LTER函數WebForm-GetEplementPortion(ement){var結果=新對象結果.x=0結果.y=0結果.width=0結果.hile=0{結果.x=元素.offsegleft結果.y=元素.offsecetTopvar父子=元素.offsetParent++++++++++++i++var父域名表示parent.tagName.tolowerCaseif (parentTagName != "table" && parentTagName != "body" && parentTagName != "html" && parentTagName != "div" && parent.clientTop && parent.clientLeft) { result.x += parent.clientLeft!iQQclientTop父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父/父{結果.x=元素.lefty=元素.top{如果(element.x){結果.x=元素x}(元素y){結果.y=元素y{結果.width=元素.offsetWidth結果.hile=元素.offsetHeight{結果.width=元素.system.pixelWidth結果.hile=元素.stype.像素H8返回結果函數WebForm_GetParentByTagName(元素標簽Name){var父/母Var上表名表示標簽名.topperCasewhyparent.parentNode : parent.parentElement!回父歸母函數WebForm-SetElementH8/}}函數WebForm-SetEplementWidth(元素寬度){}}函數WebForm-SetEplementXxwebForm-SetEplementYY}}
Baidu
map