树形菜单组件dtree

树形菜单组件dtree

ID:14441972

大小:45.00 KB

页数:25页

时间:2018-07-28

树形菜单组件dtree_第1页
树形菜单组件dtree_第2页
树形菜单组件dtree_第3页
树形菜单组件dtree_第4页
树形菜单组件dtree_第5页
资源描述:

《树形菜单组件dtree》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、树形菜单组件dtree/*--------------------------------------------------

2、

3、dTree2.05

4、www.destroydrop.com/javascript/tree/

5、

6、---------------------------------------------------

7、

8、Copyright(c)2002-2003GeirLandr?

9、

10、

11、

12、Thisscriptcanbeusedfreelyaslongasall

13、

14、copyrightmessagesareintact.

15、

16、

17、

18、Updated:17.04.20

19、03

20、

21、--------------------------------------------------*///NodeobjectfunctionNode(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

22、

23、false;this._is=

24、false;this._ls=false;this._hc=false;this._ai=0;this._p;};//TreeobjectfunctiondTree(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',fold

25、er:'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/

26、nolines_plus.gif',nlMinus:'img/nolines_minus.gif'};this.obj=objName;this.aNodes=[];this.aIndent=[];this.root=newNode(-1);this.selectedNode=null;this.selectedFound=false;this.completed=false;};//AddsanewnodetothenodearraydTree.prototype.add=function(id,pid,name,url,title,target,icon,ico

27、nOpen,open){this.aNodes[this.aNodes.length]=newNode(id,pid,name,url,title,target,icon,iconOpen,open);};//Open/closeallnodesdTree.prototype.openAll=function(){this.oAll(true);};dTree.prototype.closeAll=function(){this.oAll(false);};//OutputsthetreetothepagedTree.prototype.toString=funct

28、ion(){varstr='';if(document.getElementById){if(this.config.useCookies)this.selectedNode=this.getSelected();str+=this.addNode(this.root);}elsestr+='Browsernotsupported.';str+='

';if(!this.selectedFound)this.selectedNode=null;this.completed=true;returnstr;};//C

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
相关标签