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

📄 xmltreedatamodel.js

📁 ajax 框价.是个好工具.javascript 矿家.可以用在任何平台.
💻 JS
字号:
function XmlTreeDataModel( oDocument ){	BiTreeDataModel.call( this, oDocument );}_p = XmlTreeDataModel.prototype = new BiTreeDataModel;_p.getHasChildren = function ( y ){	var n = this.getNodeAt( y );	return n.hasChildNodes();};_p.getNodeHashCode = function ( oNode ){	if ( !BiBrowserCheck.ie )		return BiObject.toHashCode( oNode );	if ( !this._nodeList )		this._nodeList = [];	var index = this._nodeList.indexOf( oNode );	if ( index == -1 )	{		this._nodeList.push( oNode );		return "msxml-" + (this._nodeList.length - 1);	}	return "msxml-" + index;};_p.getNodeChildren = function ( oNode ){	return oNode.childNodes;};_p.getCellText = function ( x, y ){	switch ( x )	{		case 0:			return this.getNodeAt(y).nodeName;		case 1:			return this.getNodeAt(y).nodeType;		case 2:			return BiLabel.htmlToText( String(this.getNodeAt( y ).nodeValue) );	}};_p.getColumnCount = function () { return 3; };_p.getHeaderCellText = function ( x ){	switch ( x )	{		case 0:			return "nodeName";		case 1:			return "nodeType";		case 2:			return "nodeValue";	}};_p.getSortFunction = function ( x ){	switch ( x )	{		case 0:			return function ( n1, n2 )			{				if ( n1.nodeName < n2.nodeName )					return -1;				if ( n1.nodeName > n2.nodeName )					return 1;				return 0;			};		case 1:			return function ( n1, n2 )			{				if ( n1.nodeType < n2.nodeType )					return -1;				if ( n1.nodeType > n2.nodeType )					return 1;				return 0;			};		case 2:			return function ( n1, n2 )			{				if ( String(n1.nodeValue) < String(n2.nodeValue) )					return -1;				if ( String(n1.nodeValue) > String(n2.nodeValue) )					return 1;				return 0;			};	}};function ClassTreeModel(oDoc){	XmlTreeDataModel.call(this, oDoc);}_p = ClassTreeModel.prototype = new XmlTreeDataModel;_p._className = "ClassTreeModel";_p.getColumnCount = function () { return 1; };_p.getHeaderCellText = function (x){	return "Class Name";};_p.getCellText = function(x, y){	switch (x)	{		case 0:			return this.getNodeAt(y).getAttribute("name");	}};

⌨️ 快捷键说明

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