📄 《com 原理与应用》学习笔记 - linuszhu的专栏 - csdnblog.htm
字号:
document.getElementsByTagName('head')[0].appendChild(script); if (typeof script.readyState != "undefined") { script.onreadystatechange = function() { if (script.readyState != "complete" && script.readyState != "loaded") { return; } else { Anthem_LoadPageScript(result, index + 1); } } } else { Anthem_LoadPageScript(result, index + 1); } } } catch (e) { Anthem_DebugError("Error adding page script to head. " + e.name + ": " + e.message); } }}function Anthem_EvalClientSideScript(result) { if (result.script) { for (var i = 0; i < result.script.length; ++i) { try { eval(result.script[i]); } catch (e) { alert("Error evaluating client-side script!\n\nScript: " + result.script[i] + "\n\nException: " + e); } } }}function Anthem_DebugRequestText(text) {}function Anthem_DebugResponseText(text) {}function Anthem_DebugError(text) {}//Fix for bug #1429412, "Reponse callback returns previous response after file push".//see http://sourceforge.net/tracker/index.php?func=detail&aid=1429412&group_id=151897&atid=782464function Anthem_Clear__EVENTTARGET() { var form = document.getElementById(Anthem_FormID); Anthem_SetHiddenInputValue(form, "__EVENTTARGET", "");}function Anthem_InvokePageMethod(methodName, args, clientCallBack, clientCallBackArg) { Anthem_Clear__EVENTTARGET(); // fix for bug #1429412 return Anthem_CallBack(null, "Page", null, methodName, args, clientCallBack, clientCallBackArg, true, true);}function Anthem_InvokeMasterPageMethod(methodName, args, clientCallBack, clientCallBackArg) { Anthem_Clear__EVENTTARGET(); // fix for bug #1429412 return Anthem_CallBack(null, "MasterPage", null, methodName, args, clientCallBack, clientCallBackArg, true, true);}function Anthem_InvokeControlMethod(id, methodName, args, clientCallBack, clientCallBackArg) { Anthem_Clear__EVENTTARGET(); // fix for bug #1429412 return Anthem_CallBack(null, "Control", id, methodName, args, clientCallBack, clientCallBackArg, true, true);}function Anthem_PreProcessCallBack( control, e, eventTarget, causesValidation, validationGroup, imageUrlDuringCallBack, textDuringCallBack, enabledDuringCallBack, preCallBackFunction, callBackCancelledFunction, preProcessOut) { preProcessOut.Enabled = !control.disabled; var preCallBackResult = true; if (preCallBackFunction) { preCallBackResult = preCallBackFunction(control); } if (typeof(preCallBackResult) == "undefined" || preCallBackResult) { var valid = true; if (causesValidation && typeof(Page_ClientValidate) == "function") { valid = Page_ClientValidate(validationGroup); } if (typeof(WebForm_OnSubmit) == "function") { valid = WebForm_OnSubmit(); } if (valid) { var inputType = control.getAttribute("type"); inputType = (inputType == null) ? '' : inputType.toUpperCase(); if (inputType == "IMAGE" && e != null) { var form = document.getElementById(Anthem_FormID); if (e.offsetX) { Anthem_SetHiddenInputValue(form, eventTarget + ".x", e.offsetX); Anthem_SetHiddenInputValue(form, eventTarget + ".y", e.offsetY); } else { Anthem_SetHiddenInputValue(form, eventTarget + ".x", e.clientX - control.offsetLeft + 1); Anthem_SetHiddenInputValue(form, eventTarget + ".y", e.clientY - control.offsetTop + 1); } } if (imageUrlDuringCallBack || textDuringCallBack) { if (control.nodeName.toUpperCase() == "INPUT") { if (inputType == "CHECKBOX" || inputType == "RADIO" || inputType == "TEXT") { preProcessOut.OriginalText = GetLabelText(control.id); SetLabelText(control.id, textDuringCallBack); } else if (inputType == "IMAGE") { if (imageUrlDuringCallBack) { preProcessOut.OriginalText = control.src; control.src = imageUrlDuringCallBack; } else { preProcessOut.ParentElement = control.parentElement ? control.parentElement : control.parentNode; if (preProcessOut.ParentElement) { preProcessOut.OriginalText = preProcessOut.ParentElement.innerHTML; preProcessOut.ParentElement.innerHTML = textDuringCallBack; } } } else if (inputType == "SUBMIT") { preProcessOut.OriginalText = control.value; control.value = textDuringCallBack; } } else if (control.nodeName.toUpperCase() == "SELECT") { preProcessOut.OriginalText = GetLabelText(control.id); SetLabelText(control.id, textDuringCallBack); } else { preProcessOut.OriginalText = control.innerHTML; control.innerHTML = textDuringCallBack; } } control.disabled = (typeof enabledDuringCallBack == "undefined") ? false : !enabledDuringCallBack; return true; } else { return false; } } else { if (callBackCancelledFunction) { callBackCancelledFunction(control); } return false; }}function Anthem_PreProcessCallBackOut() { // Fields this.ParentElement = null; this.OriginalText = ''; this.Enabled = true;}function Anthem_PostProcessCallBack( result, control, eventTarget, clientCallBack, clientCallBackArg, imageUrlDuringCallBack, textDuringCallBack, postCallBackFunction, preProcessOut) { if (postCallBackFunction) { postCallBackFunction(control); } control.disabled = !preProcessOut.Enabled; var inputType = control.getAttribute("type"); inputType = (inputType == null) ? '' : inputType.toUpperCase(); if (inputType == "IMAGE") { var form = document.getElementById(Anthem_FormID); Anthem_RemoveHiddenInput(form, eventTarget + ".x"); Anthem_RemoveHiddenInput(form, eventTarget + ".y"); } if (imageUrlDuringCallBack || textDuringCallBack) { if (control.nodeName.toUpperCase() == "INPUT") { if (inputType == "CHECKBOX" || inputType == "RADIO" || inputType == "TEXT") { SetLabelText(control.id, preProcessOut.OriginalText); } else if (inputType == "IMAGE") { if (imageUrlDuringCallBack) { control.src = preProcessOut.OriginalText; } else { preProcessOut.ParentElement.innerHTML = preProcessOut.OriginalText; } } else if (inputType == "SUBMIT") { control.value = preProcessOut.OriginalText; } } else if (control.nodeName.toUpperCase() == "SELECT") { SetLabelText(control.id, preProcessOut.OriginalText); } else { control.innerHTML = preProcessOut.OriginalText; } } if (clientCallBack) { clientCallBack(result, clientCallBackArg); }}function Anthem_FireCallBackEvent( control, e, eventTarget, eventArgument, causesValidation, validationGroup, imageUrlDuringCallBack, textDuringCallBack, enabledDuringCallBack, preCallBackFunction, postCallBackFunction, callBackCancelledFunction, includeControlValuesWithCallBack, updatePageAfterCallBack) { var preProcessOut = new Anthem_PreProcessCallBackOut(); var preProcessResult = Anthem_PreProcessCallBack( control, e, eventTarget, causesValidation, validationGroup, imageUrlDuringCallBack, textDuringCallBack, enabledDuringCallBack, preCallBackFunction, callBackCancelledFunction, preProcessOut ); if (preProcessResult) { Anthem_FireEvent( eventTarget, eventArgument, function(result) { Anthem_PostProcessCallBack( result, control, eventTarget, null, null, imageUrlDuringCallBack, textDuringCallBack, postCallBackFunction, preProcessOut ); }, null, includeControlValuesWithCallBack, updatePageAfterCallBack ); }}function AnthemListControl_OnClick( e, causesValidation, validationGroup, textDuringCallBack, enabledDuringCallBack, preCallBackFunction, postCallBackFunction, callBackCancelledFunction, includeControlValuesWithCallBack, updatePageAfterCallBack) {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -