DTree的改进与使用经验.docVIP

  • 83
  • 0
  • 约1.94万字
  • 约 22页
  • 2017-02-09 发布于重庆
  • 举报
DTree的改进与使用经验

1、dtree.js源码 /*| | dTree 2.05 | /javascript/tree/ | || | Copyright (c) 2002-2003 Geir Landr? | | | | This script can be used freely as long as all | | copyright messages are intact. | | | | Updated: 17.04.2003 | |*/ /** * Node objectbr * 节点对象br */ function Node(id, pid, name, url, title, target, icon, iconOpen, open) { this.id = id; // 节点id this.pid = pid; // 节点父id = name; // 节点显示名称; this.url = url; // 节点超链接地址; this.title = title; // 节点Tips文本; this.target = target; // 节点链接所打开的目标frame(_blank, _parent, _self, _top) this.icon = icon; // 节点默认图标; this.iconOpen = iconOpen; // 节点展开图标; this._io = open || false; // 节点展开标识; this._is = false; // 节点选中标识; this._ls = false; // 同级最后节点标识; this._hc = false; // 包含子节点标识; this._ai = 0; // 节点在节点数组中的索引值,初始值为0 this._p; // 保存父节点对象; }; /** * Tree objectbr * 树对象br */ function dTree(objName,imagePath) { this.config = { target : null, // 默认的节点链接所打开的目标frame(_blank, _parent, _self, _top) folderLinks : true, // true文件夹节点如果有超链地址,点击节点打开超链接而不是展开节点;false忽略超链展开或折叠节点; useSelection : true, // true高亮显示选中的节点;false反之; useCookies : true, // true使用Cookies保存节点状态;false反之; useLines : true, // true使用虚线连接节点的缩进;false反之; useIcons : true, // true使用图标;false反之; useStatusText : false, // false不在状态栏显示节点名称;true反之; closeSameLevel : false, // true同一级节点只能有一个处于展开状态;false反之; inOrder : false, // false在整个节点数组中查找子节点;true在索引大于本节点的数组元素中查找子节点(如果子节点总是在父节点后面添加的话,设为true将加快tree的构建速度); imagePath : null // 图片路径; } this.icon = { root : (imagePath===undefined?img/base.gif:imagePath + /img/base.gif), // 根节点图标 folder : (imagePath===undefined?img/folder.gif:imagePath + /img/folder.gif), // 枝节点文件夹图标 folderOpen : (imagePa

文档评论(0)

1亿VIP精品文档

相关文档