无限级Js树型菜单(可刷新)dTree

//说明:图片自已加 html的JS       d = new dTree(d);    d.add(0,-1,My example tree);    d.add(1,0,Node 1,example01.html);    d.add(2,0,Node 2,example01.html);    d.add(3,1,Node 1.1
摘要由CSDN通过智能技术生成

//说明:图片自已加

html的JS

<script type="text/javascript">
  
</script>

/*--------------------------------------------------|
| dTree 2.05 | www.destroydrop.com/javascript/tree/ |
|---------------------------------------------------|
| Copyright (c) 2002-2003 Geir Landr?              |
|--------------------------------------------------*/

.dtree {
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #ffffff;
white-space: nowrap;
}
.dtree img {
border: 0px;
vertical-align: middle;
}
.dtree a {
color: #ffffff;
text-decoration: none;
}
.dtree a.node, .dtree a.nodeSel {
white-space: nowrap;
padding: 1px 2px 1px 2px;
}
.dtree a.node:hover, .dtree a.nodeSel:hover {
color: #ffffff;
text-decoration: underline;
}
.dtree a.nodeSel {
background-color: #c0d2ec;
}
.dtree .clip {
overflow: hidden;
}

/*--------------------------------------------------|

| dTree 2.05 | www.destroydrop.com/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 object

function Node(id, pid, name, url, title, target, icon, iconOpen, open) {

this.id = id;

this.pid = pid;

this.name = name;

this.url = url;

this.title = title;

this.target = target;

this.icon = icon;

this.iconOpen = iconOpen;

this._io = open || false;

this._is = false;

this._ls = false;

this._hc = false;

this._ai = 0;

this._p;

};

// Tree object

function dTree(objName) {

this.config = {

   target      : null,

   folderLinks    : true,

   useSelection   : true,

   useCookies    : true,

   useLines     : true,

   useIcons     : true,

   useStatusText   : false,

   closeSameLevel : false,

   inOrder      : false

}

this.icon = {

   root     : 'img/base.gif',

   folder    : 'img/folder.gif',

   folderOpen : 'img/folderopen.gif',

   node     : 'img/page.gif',

   empty     : 'img/empty.gif',

   line     : 'img/line.gif',

   join     : 'img/join.gif',

   joinBottom : 'img/joinbottom.gif',

   plus     : 'img/plus.gif',

   plusBottom : 'img/plusbottom.gif',

   minus     : 'img/minus.gif',

   minusBottom : 'img/minusbottom.gif',

   nlPlus    : 'img/nolines_plus.gif',

   nlMinus    : 'img/nolines_minus.gif'

};

this.obj = objName;

this.aNodes = [];

this.aIndent = [];

this.root = new Node(-

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值