⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 《com 原理与应用》学习笔记 - linuszhu的专栏 - csdnblog.htm

📁 OPC document,collecting~
💻 HTM
📖 第 1 页 / 共 5 页
字号:
		return result;	}	x.open("POST", url ? url : Anthem_DefaultURL, clientCallBack ? true : false);	x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");	x.setRequestHeader("Accept-Encoding", "gzip, deflate");	if (clientCallBack) {		x.onreadystatechange = function() {			if (x.readyState != 4) {				return;			}			Anthem_DebugResponseText(x.responseText);			result = Anthem_GetResult(x);			if (result.error) {				Anthem_DebugError(result.error);				if (window.Anthem_Error) {					Anthem_Error(result);				}			}			if (updatePageAfterCallBack) {				Anthem_UpdatePage(result);			}			Anthem_EvalClientSideScript(result);			clientCallBack(result, clientCallBackArg);			x = null;			if (window.Anthem_PostCallBack) {				Anthem_PostCallBack();			}		}	}    var encodedData = "";    if (target == "Page") {        encodedData += "&Anthem_PageMethod=" + method;    } else if (target == "MasterPage") {        encodedData += "&Anthem_MasterPageMethod=" + method;    } else if (target == "Control") {        encodedData += "&Anthem_ControlID=" + id.split(":").join("_");        encodedData += "&Anthem_ControlMethod=" + method;    }	if (args) {		for (var argsIndex = 0; argsIndex < args.length; ++argsIndex) {			if (args[argsIndex] instanceof Array) {				for (var i = 0; i < args[argsIndex].length; ++i) {					encodedData += "&Anthem_CallBackArgument" + argsIndex + "=" + Anthem_Encode(args[argsIndex][i]);				}			} else {				encodedData += "&Anthem_CallBackArgument" + argsIndex + "=" + Anthem_Encode(args[argsIndex]);			}		}	}	if (updatePageAfterCallBack) {		encodedData += "&Anthem_UpdatePage=true";	}	if (includeControlValuesWithCallBack) {		var form = document.getElementById(Anthem_FormID);		if (form != null) {			for (var elementIndex = 0; elementIndex < form.length; ++elementIndex) {				var element = form.elements[elementIndex];				if (element.name) {					var elementValue = null;					if (element.nodeName.toUpperCase() == "INPUT") {						var inputType = element.getAttribute("type").toUpperCase();						if (inputType == "TEXT" || inputType == "PASSWORD" || inputType == "HIDDEN") {							elementValue = element.value;						} else if (inputType == "CHECKBOX" || inputType == "RADIO") {							if (element.checked) {								elementValue = element.value;							}						}					} else if (element.nodeName.toUpperCase() == "SELECT") {						if (element.multiple) {							elementValue = [];							for (var i = 0; i < element.length; ++i) {								if (element.options[i].selected) {									elementValue.push(element.options[i].value);								}							}						} else if (element.length == 0) {						    elementValue = null;						} else {							elementValue = element.value;						}					} else if (element.nodeName.toUpperCase() == "TEXTAREA") {						elementValue = element.value;					}					if (elementValue instanceof Array) {						for (var i = 0; i < elementValue.length; ++i) {							encodedData += "&" + element.name + "=" + Anthem_Encode(elementValue[i]);						}					} else if (elementValue != null) {						encodedData += "&" + element.name + "=" + Anthem_Encode(elementValue);					}				}			}			// ASP.NET 1.1 won't fire any events if neither of the following			// two parameters are not in the request so make sure they're			// always in the request.			if (typeof form.__VIEWSTATE == "undefined") {				encodedData += "&__VIEWSTATE=";			}			if (typeof form.__EVENTTARGET == "undefined") {				encodedData += "&__EVENTTARGET=";			}		}	}	if (encodedData.length > 0) {	    encodedData = encodedData.substring(1);	}	Anthem_DebugRequestText(encodedData.split("&").join("\n&"));	x.send(encodedData);	if (!clientCallBack) {		Anthem_DebugResponseText(x.responseText);		result = Anthem_GetResult(x);		if (result.error) {			Anthem_DebugError(result.error);			if (window.Anthem_Error) {				Anthem_Error(result);			}		}		if (updatePageAfterCallBack) {			Anthem_UpdatePage(result);		}		Anthem_EvalClientSideScript(result);		if (window.Anthem_PostCallBack) {			Anthem_PostCallBack();		}	}	return result;}function Anthem_GetResult(x) {	var result = { "value": null, "error": null };	var responseText = x.responseText;	try {		result = eval("(" + responseText + ")");	} catch (e) {		if (responseText.length == 0) {			result.error = "NORESPONSE";		} else {			result.error = "BADRESPONSE";			result.responseText = responseText;		}	}	return result;}function Anthem_SetHiddenInputValue(form, name, value) {    var input = null;    if (form[name]) {        input = form[name];    } else {        input = document.createElement("input");        input.setAttribute("name", name);        input.setAttribute("type", "hidden");    }    input.setAttribute("value", value);    var parentElement = input.parentElement ? input.parentElement : input.parentNode;    if (parentElement == null) {        form.appendChild(input);        form[name] = input;    }}function Anthem_RemoveHiddenInput(form, name) {    var input = form[name];    if (input != null && typeof(input) != "undefined") {      var parentElement = input.parentElement ? input.parentElement : input.parentNode;      if (parentElement != null) {          form[name] = null;          parentElement.removeChild(input);      }    }}function Anthem_FireEvent(eventTarget, eventArgument, clientCallBack, clientCallBackArg, includeControlValuesWithCallBack, updatePageAfterCallBack) {	var form = document.getElementById(Anthem_FormID);	Anthem_SetHiddenInputValue(form, "__EVENTTARGET", eventTarget);	Anthem_SetHiddenInputValue(form, "__EVENTARGUMENT", eventArgument);	Anthem_CallBack(null, null, null, null, null, clientCallBack, clientCallBackArg, includeControlValuesWithCallBack, updatePageAfterCallBack);	form.__EVENTTARGET.value = "";	form.__EVENTARGUMENT.value = "";}function Anthem_UpdatePage(result) {	var form = document.getElementById(Anthem_FormID);	if (result.viewState) {		Anthem_SetHiddenInputValue(form, "__VIEWSTATE", result.viewState);	}	if (result.viewStateEncrypted) {		Anthem_SetHiddenInputValue(form, "__VIEWSTATEENCRYPTED", result.viewStateEncrypted);	}	if (result.eventValidation) {		Anthem_SetHiddenInputValue(form, "__EVENTVALIDATION", result.eventValidation);	}	if (result.controls) {		for (var controlID in result.controls) {			var containerID = "Anthem_" + controlID.split("$").join("_") + "__";			var control = document.getElementById(containerID);			if (control) {				control.innerHTML = result.controls[controlID];				if (result.controls[controlID] == "") {					control.style.display = "none";				} else {					control.style.display = "";				}			}		}	}	if (result.pagescript) {	    Anthem_LoadPageScript(result, 0);	}}// Load each script in order and wait for each one to load before proceedingfunction Anthem_LoadPageScript(result, index) {    if (index < result.pagescript.length) {		try {		    var script = document.createElement('script');		    script.type = 'text/javascript';		    if (result.pagescript[index].indexOf('src=') == 0) {		        script.src = result.pagescript[index].substring(4);		    } else {		        if (script.canHaveChildren ) {		            script.appendChild(document.createTextNode(result.pagescript[index]));		        } else {		            script.text = result.pagescript[index];		        }		    }		    var heads = document.getElementsByTagName('head');		    if (heads != null && typeof(heads) != "undefined" && heads.length > 0) {		        var head = heads[0];		        // The order that scripts appear is important since later scripts can		        // redefine a function. Therefore it is important to add every script		        // to the page and in the same order that they were added on the server.		        // On the other hand, if we just keep adding scripts the DOM will grow		        // unnecessarily. This code scans the <head> element block and removes 		        // previous instances of the identical script.		        var found = false;		        for (var child = 0; child < head.childNodes.length; child++) {		            var control = head.childNodes[child];		            if (control.tagName.toUpperCase() == "SCRIPT") {		                if (script.src.length > 0) {		                    if (script.src == control.src) {		                        found = true;		                        break;		                    }		                } else if (script.innerHTML.length > 0) {		                    if (script.innerHTML == control.innerHTML) {		                        found = true;		                        break;		                    }		                }		            }		        }		        if (found) {		            head.removeChild(control);		        }		        		        // Now we append the new script and move on to the next script.		        // Note that this is a recursive function. It stops when the		        // index grows larger than the number of scripts.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -