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

📄 formbean.asp

📁 本系统是一套完整游戏金币交易平台,可以建立一个网站实现游戏金币的在线交易
💻 ASP
字号:
<!--#include file="DOM.asp"-->

<%
/*=========================================================================================
 * 表单元素映射类
 =========================================================================================*/
function FormBean(request) {
	//成员变量
	this.request = request;
	this.domObj = new DOM("root");
		
	//成员函数
	this.create = create;
	this.getNode = getNode;  //得到FormBean里的指定结点

	//初始化调用
	this.create();
}

/*创建结点树*/
function create() {
	/*统一QueryString和Form请求*/
	var RequestSet;  
	if(this.request.ServerVariables("REQUEST_METHOD") == "GET") {
		RequestSet = this.request.QueryString;
	}
	else {
		RequestSet = this.request.Form;
	}

	/*循环遍历所有form元素,并且对form元素进行预处理,将form元素转换成node数组串*/
	var allItem = new Array();
	var itemName;
	var itemValue;
	for(var i=1; i<=RequestSet.Count; i++) {
		itemName = RequestSet.Key(i);
		itemValue = RequestSet(itemName)+"";
		
		itemValue = itemValue.replace(/\//g, "A1B2");

		var item = itemName + "[@value='" + itemValue + "']";
		var itemNodeArr = divFormItemToNodeArr(item);
		allItem.push(itemNodeArr);
	}

	/*创建树*/
	this.domObj.buildByNodeArr(allItem);
}

/*得到FormBean的指定结点*/
function getNode(xpath) {
	return this.domObj.getNodeByXPath(xpath);
}

%>




⌨️ 快捷键说明

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