网站地图
首页
php教程
asp.net教程
手机开发
css教程
网页制作
办公数码
jsp教程
asp教程
ps教程
当前位置:
编程学习网
>>
祝福短信
>
经典短信
> >
[javascript学习指南]javascript 经典树型折叠菜单代码
[javascript学习指南]javascript 经典树型折叠菜单代码
发布时间:2019-04-03
【www.gdgbn.com--经典短信】
提示:您可以先修改部分代码再运行
<script type="text/javascript"> 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 : false, useStatusText : false, closeSameLevel : false, inOrder : false } this.icon = { root : "http://www.111cn.net/images/base.gif", folder : "http://www.111cn.net/images/folder.gif", folderOpen : "http://www.111cn.net/images/folderopen.gif", node : "http://www.111cn.net/images/page.gif", empty : "http://www.111cn.net/images/empty.gif", line : "http://www.111cn.net/images/line.gif", join : "http://www.111cn.net/images/join.gif", joinBottom : "http://www.111cn.net/images/joinbottom.gif", plus : "http://www.111cn.net/images/plus.gif", plusBottom : "http://www.111cn.net/images/plusbottom.gif", minus : "http://www.111cn.net/images/minus.gif", minusBottom : "http://www.111cn.net/images/minusbottom.gif", nlPlus : "http://www.111cn.net/images/nolines_plus.gif", nlMinus : "http://www.111cn.net/images/nolines_minus.gif" }; this.obj = objName; this.aNodes = []; this.aIndent = []; this.root = new Node(-1); this.selectedNode = null; this.selectedFound = false; this.completed = false; }; // Adds a new node to the node array dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open) { this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open); }; // Open/close all nodes dTree.prototype.openAll = function() { this.oAll(true); }; dTree.prototype.closeAll = function() { this.oAll(false); }; // Outputs the tree to the page dTree.prototype.toString = function() { var str = "n"; if (document.getElementById) { if (this.config.useCookies) this.selectedNode = this.getSelected(); str += this.addNode(this.root); } else str += "Browser not supported."; str += ""; if (!this.selectedFound) this.selectedNode = null; this.completed = true; return str; }; // Creates the tree structure dTree.prototype.addNode = function(pNode) { var str = ""; var n=0; if (this.config.inOrder) n = pNode._ai; for (n; n
"; } if (node.url) { str += ""; } else if ((!this.config.folderLinks || !node.url) && node._hc && node.pid != this.root.id) str += ""; str += node.name; if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += ""; str += ""; if (node._hc) { str += ""; str += this.addNode(node); str += ""; } this.aIndent.pop(); return str; }; // Adds the empty and line icons dTree.prototype.indent = function(node, nodeId) { var str = ""; if (this.root.id != node.pid) { for (var n=0; n
"; (node._ls) ? this.aIndent.push(0) : this.aIndent.push(1); if (node._hc) { str += "
"; } else str += "
"; } return str; }; // Checks if a node has any children and if it is the last sibling dTree.prototype.setCS = function(node) { var lastId; for (var n=0; n
<script language="JavaScript"> d = new dTree("d"); d.add(0,-1,"所有分类:"); d.add(1, 0, "源码/资料", "/sourcecode/download2.html"); d.add(4, 1, "Windows编程", "/sourcecode/windows/download5.html"); d.add(5, 4, "界面编程", "/sourcecode/windows/GUI-Control/download6.html"); d.add(66, 5, "按钮控件", "/sourcecode/windows/GUI-Control/button/download67.html"); d.add(67, 5, "组合框控件", "/sourcecode/windows/GUI-Control/ComboBox/download68.html"); d.add(68, 5, "编辑框", "/sourcecode/windows/GUI-Control/EditBox/download69.html"); d.add(69, 5, "TreeView控件", "/sourcecode/windows/GUI-Control/TreeView/download70.html"); d.add(70, 5, "Static控件", "/sourcecode/windows/GUI-Control/static/download71.html"); d.add(71, 5, "PropertySheet", "/sourcecode/windows/GUI-Control/PropertySheet/download72.html"); d.add(72, 5, "RichEdit", "/sourcecode/windows/GUI-Control/RichEdit/download73.html"); d.add(73, 5, "ListView/ListBox", "/sourcecode/windows/GUI-Control/ListView/download74.html"); d.add(74, 5, "菜单", "/sourcecode/windows/GUI-Control/menu/download75.html"); d.add(75, 5, "工具条", "/sourcecode/windows/GUI-Control/toolbar/download76.html"); d.add(76, 5, "状态条", "/sourcecode/windows/GUI-Control/StatusBar/download77.html"); d.add(207, 5, "Tab控件", "/sourcecode/windows/GUI-Control/TabControl/download208.html"); d.add(94, 5, "对话框与窗口", "/sourcecode/windows/GUI-Control/dialog/download95.html"); d.add(12, 4, "系统编程", "/sourcecode/windows/system/download13.html"); d.add(13, 4, "网络编程", "/sourcecode/windows/network/download14.html"); d.add(21, 4, "驱动编程", "/sourcecode/windows/device-driver/download22.html"); d.add(7, 4, "
数据库
编程", "/sourcecode/windows/database/download8.html"); d.add(11, 4, "GDI/图象编程", "/sourcecode/windows/GDI/download12.html"); d.add(121, 4, "C#编程", "/sourcecode/windows/CSharp/download122.html"); d.add(193, 4, ".net编程", "/sourcecode/windows/dotnet/download194.html"); d.add(8, 4, "多媒体编程", "/sourcecode/windows/multimedia/download9.html"); d.add(15, 4, "通讯编程", "/sourcecode/windows/comm/download16.html"); d.add(17, 4, "Shell编程", "/sourcecode/windows/shell/download18.html"); d.add(6, 4, "ActiveX/DCOM/ATL", "/sourcecode/windows/ActiveX/download7.html"); d.add(10, 4, "输入法编程", "/sourcecode/windows/ime/download11.html"); d.add(14, 4, "Internet/IE编程", "/sourcecode/windows/internet/download15.html"); d.add(18, 4, "钩子与API截获", "/sourcecode/windows/APIHook/download19.html"); d.add(16, 4, "屏幕保护", "/sourcecode/windows/screensaver/download17.html"); d.add(82, 4, "DirextX编程", "/sourcecode/windows/DirectX/download83.html"); d.add(93, 4, "进程与线程", "/sourcecode/windows/IPC/download94.html"); d.add(127, 4, "控制台编程", "/sourcecode/windows/console/download128.html"); d.add(126, 4, "文件操作", "/sourcecode/windows/File/download127.html"); d.add(20, 4, "打印编程", "/sourcecode/windows/printing/download21.html"); d.add(19, 4, "多显示器编程", "/sourcecode/windows/mulmon/download20.html"); d.add(83, 4, "DNA", "/sourcecode/windows/DNA/download84.html"); d.add(22, 4, "其他小程序", "/sourcecode/windows/other/download23.html"); d.add(23, 1, "Linux/Unix编程", "/sourcecode/unix_linux/download24.html"); d.add(80, 23, "网络", "/sourcecode/unix_linux/network/download81.html"); d.add(24, 1, "Internet/网络编程", "/sourcecode/internet/download25.html"); d.add(43, 24, "Web服务器", "/sourcecode/internet/Web-Server/download44.html"); d.add(44, 24, "浏览器", "/sourcecode/internet/Web-Browser/download45.html"); d.add(45, 24, "Ftp服务器", "/sourcecode/internet/Ftp/Server/download46.html"); d.add(46, 24, "Ftp客户端", "/sourcecode/internet/ftp/client/download47.html"); d.add(47, 24, "PlugIns编程", "/sourcecode/internet/Plug-Ins/download48.html"); d.add(48, 24, "代理服务器", "/sourcecode/internet/Proxy-Server/download49.html"); d.add(49, 24, "Email服务器", "/sourcecode/internet/email/server/download50.html"); d.add(50, 24, "Email客户端", "/sourcecode/internet/email/client/download51.html"); d.add(51, 24, "WEB邮件程序", "/sourcecode/internet/email/web-based/download52.html"); d.add(52, 24, "防火墙与安全工具", "/sourcecode/hack/Firewall/download53.html"); d.add(53, 24, "Telnet服务器", "/sourcecode/internet/telnet/server/download54.html"); d.add(54, 24, "Telnet客户端", "/sourcecode/internet/telnet/client/download55.html"); d.add(55, 24, "ICQ/即时通讯", "/sourcecode/internet/IMChat/download56.html"); d.add(56, 24, "搜索引擎", "/sourcecode/internet/Search-Engine/download57.html"); d.add(60, 24, "网络截获/分析", "/sourcecode/hack/sniffer/download61.html"); d.add(95, 24, "xml/soap/webservice", "/sourcecode/internet/xml/download96.html"); d.add(90, 24, "远程控制编程", "/sourcecode/hack/trojan/download91.html"); d.add(101, 24, "P2P编程", "/sourcecode/internet/p2p/download102.html"); d.add(106, 24, "WEB源码(ASP,PHP,...)", "/sourcecode/internet/web-design/download107.html"); d.add(118, 24, "TCP/IP协议栈", "/sourcecode/internet/tcp-ip/download119.html"); d.add(172, 24, "SNMP编程", "/sourcecode/internet/snmp/download173.html"); d.add(201, 24, "SilverLight", "/sourcecode/internet/silverlight/download202.html"); d.add(182, 24, "网格计算", "/sourcecode/internet/wgjs/download183.html"); d.add(25, 1, "系统/网络安全", "/sourcecode/security/download26.html"); d.add(26, 25, "杀毒", "/sourcecode/kill-virus/download27.html"); d.add(57, 25, "弱点检测代码", "/sourcecode/hack/exploit/download58.html"); d.add(58, 25, "扫描程序", "/sourcecode/hack/scanner/download59.html"); d.add(59, 25, "ICQ弱点检测代码", "/sourcecode/hack/icq/download60.html"); d.add(120, 25, "破解", "/sourcecode/hack/crack/download121.html"); d.add(27, 1, "通讯/手机编程", "/sourcecode/communication/download28.html"); d.add(115, 27, "语音压缩", "/sourcecode/communication/voice-compress/download116.html"); d.add(197, 27, "3G开发", "/sourcecode/communication/3G/download198.html"); d.add(204, 27, "android开发", "/sourcecode/communication/android/download205.html"); d.add(205, 27, "iPhone", "/sourcecode/communication/iPhone/download206.html"); d.add(99, 27, "BREW编程", "/sourcecode/communication/brew/download100.html"); d.add(100, 27, "J2ME", "/sourcecode/communication/J2ME/download101.html"); d.add(113, 27, "Symbian", "/sourcecode/communication/symbian/download114.html"); d.add(114, 27, "Windows Mobile", "/sourcecode/communication/windows-mobile/download115.html"); d.add(117, 27, "TAPI编程", "/sourcecode/communication/tapi/download118.html"); d.add(107, 27, "串口编程", "/sourcecode/communication/com-port/download108.html"); d.add(108, 27, "并口编程", "/sourcecode/communication/para-port/download109.html"); d.add(116, 27, "USB编程", "/sourcecode/communication/usb/download117.html"); d.add(109, 27, "Modem编程", "/sourcecode/communication/modem/download110.html"); d.add(86, 27, "传真(Fax)编程", "/sourcecode/communication/fax/download87.html"); d.add(181, 27, "GPS编程", "/sourcecode/communication/GPS/download182.html"); d.add(110, 27, "手机短信编程", "/sourcecode/communication/sms/download111.html"); d.add(111, 27, "手机彩信(MMS)编程", "/sourcecode/communication/mms/download112.html"); d.add(112, 27, "手机WAP编程", "/sourcecode/communication/wap/download113.html"); d.add(198, 27, "MTK", "/sourcecode/communication/mtk/download199.html"); d.add(191, 27, "RFID编程", "/sourcecode/communication/rfid/download192.html"); d.add(28, 1, "游戏", "/sourcecode/game/download29.html"); d.add(119, 28, "外挂编程", "/sourcecode/game/hack/download120.html"); d.add(173, 28, "射击游戏", "/sourcecode/game/Shot/download174.html"); d.add(174, 28, "模拟服务器", "/sourcecode/game/Simulater/download175.html"); d.add(161, 28, "棋牌游戏", "/sourcecode/game/chess-poker/download162.html"); d.add(162, 28, "游戏引擎", "/sourcecode/game/Engine/download163.html"); d.add(180, 28, "其他智力游戏", "/sourcecode/game/other-riddle/download181.html"); d.add(166, 28, "其他游戏", "/sourcecode/game/Others/download167.html"); d.add(30, 1, "多媒体", "/sourcecode/multimedia/download31.html"); d.add(61, 30, "Audio", "/sourcecode/multimedia/audio/download62.html"); d.add(62, 30, "midi", "/sourcecode/multimedia/midi/download63.html"); d.add(63, 30, "mpeg/mp3", "/sourcecode/multimedia/mpeg/download64.html"); d.add(64, 30, "IP电话/视频会议", "/sourcecode/multimedia/VOIP/download65.html"); d.add(65, 30, "DVD", "/sourcecode/multimedia/dvd/download66.html"); d.add(88, 30, "流媒体/Mpeg4/MP4", "/sourcecode/multimedia/streaming/download89.html"); d.add(122, 30, "视频捕捉/采集", "/sourcecode/multimedia/vfw/download123.html"); d.add(38, 30, "语音合成与识别", "/sourcecode/multimedia/speech/download39.html"); d.add(98, 1, "嵌入式/单片机编程", "/sourcecode/embeded/download99.html"); d.add(140, 98, "微处理器开发", "/sourcecode/embeded/ARM/download141.html"); d.add(141, 98, "嵌入式Linux", "/sourcecode/embeded/UCLinux/download142.html"); d.add(142, 98, "单片机开发", "/sourcecode/embeded/SCM/download143.html"); d.add(143, 98, "VxWorks", "/sourcecode/embeded/VxWorks/download144.html"); d.add(144, 98, "uCOS", "/sourcecode/embeded/uCOS/download145.html"); d.add(145, 98, "DSP编程", "/sourcecode/embeded/DSP/download146.html"); d.add(168, 98, "Windows CE", "/sourcecode/embeded/WindowsCE/download169.html"); d.add(178, 98, "VHDL/FPGA/Verilog", "/sourcecode/embeded/VHDL/download179.html"); d.add(146, 98, "其他嵌入式/单片机内容", "/sourcecode/embeded/Others/download147.html"); d.add(31, 1, "图形图象", "/sourcecode/graph/download32.html"); d.add(149, 31, "图片显示", "/sourcecode/graph/Viewer/download150.html"); d.add(150, 31, "2D图形编程", "/sourcecode/graph/2D/download151.html"); d.add(151, 31, "3D图形编程", "/sourcecode/graph/3D/download152.html"); d.add(171, 31, "波变换", "/sourcecode/graph/Wavelet/download172.html"); d.add(156, 31, "绘图程序", "/sourcecode/graph/Drawing/download157.html"); d.add(148, 31, "GIS编程", "/sourcecode/graph/GIS/download149.html"); d.add(124, 31, "分形几何", "/sourcecode/graph/Fractal/download125.html"); d.add(84, 31, "图形图像处理", "/sourcecode/graph/texture-mapping/download85.html"); d.add(9, 31, "OpenGL", "/sourcecode/windows/OpenGL/download10.html"); d.add(125, 31, "图形/文字识别", "/sourcecode/graph/Recognize/download126.html"); d.add(209, 31, "CAD", "/sourcecode/graph/CAD/download210.html"); d.add(206, 31, "OpenCV", "/sourcecode/graph/opencv/download207.html"); d.add(33, 1, "压缩解压", "/sourcecode/compress/download34.html"); d.add(34, 1, "加密解密", "/sourcecode/crypt/download35.html"); d.add(87, 34, "CA认证", "/sourcecode/crypt/ca/download88.html"); d.add(35, 1, "数值算法/人工智能", "/sourcecode/math/download36.html"); d.add(153, 35, "数据结构", "/sourcecode/math/DataStructs/download154.html"); d.add(154, 35, "数学计算", "/sourcecode/math/algrithm/download155.html"); d.add(155, 35, "人工智能/神经网络", "/sourcecode/math/AI/download156.html"); d.add(179, 35, "STL", "/sourcecode/math/STL/download180.html"); d.add(152, 35, "matlab例程", "/sourcecode/math/matlab/download153.html"); d.add(97, 35, "生物技术", "/sourcecode/math/biometrics/download98.html"); d.add(39, 1, "Java编程", "/sourcecode/Java/download40.html"); d.add(78, 39, "Applet", "/sourcecode/java/applet/download79.html"); d.add(79, 78, "游戏", "/sourcecode/java/applet/game/download80.html"); d.add(199, 39, "JavaScript", "/sourcecode/java/javascript/download200.html"); d.add(195, 39, "Jsp/Servlet", "/sourcecode/java/jsp/download196.html"); d.add(196, 39, "Ajax", "/sourcecode/java/ajax/download197.html"); d.add(42, 1, "*行业应用", "/sourcecode/app/download43.html"); d.add(129, 42, "金融证券系统", "/sourcecode/app/Finance/download130.html"); d.add(130, 42, "教育系统应用", "/sourcecode/app/Education/download131.html"); d.add(131, 42, "企业管理", "/sourcecode/app/ERP/download132.html"); d.add(132, 42, "邮电通讯系统", "/sourcecode/app/TeleCom/download133.html"); d.add(133, 42, "OA系统", "/sourcecode/app/OA/download134.html"); d.add(135, 42, "医药行业", "/sourcecode/app/Hospital/download136.html"); d.add(167, 42, "电子政务应用", "/sourcecode/app/Goverment/download168.html"); d.add(175, 42, "酒店行业", "/sourcecode/app/Hotel/download176.html"); d.add(176, 42, "百货/超市行业", "/sourcecode/app/Shop/download177.html"); d.add(177, 42, "交通/航空行业", "/sourcecode/app/Transportation/download178.html"); d.add(203, 42, "能源行业(电力石油煤炭)", "/sourcecode/app/Energy/download204.html"); d.add(163, 42, "家庭/个人应用", "/sourcecode/app/Personal/download164.html"); d.add(134, 42, "其他行业", "/sourcecode/app/Others/download135.html"); d.add(81, 1, "
数据库
系统", "/sourcecode/database/download82.html"); d.add(136, 81, "Oracle数据库", "/sourcecode/database/Oracle/download137.html"); d.add(137, 81, "SQL Server", "/sourcecode/database/SqlServer/download138.html"); d.add(138, 81, "MySQL数据库", "/sourcecode/database/MySQL/download139.html"); d.add(139, 81, "其他数据库", "/sourcecode/database/Others/download140.html"); d.add(40, 1, "汇编语言", "/sourcecode/ASM/download41.html"); d.add(41, 37, "SCSI/ASPI", "/sourcecode/scsi-aspi/download42.html"); d.add(32, 1, "编译器/解释器", "/sourcecode/compiler/download33.html"); d.add(29, 1, "编辑器/阅读器", "/sourcecode/editor/download30.html"); d.add(37, 1, "磁盘编程", "/sourcecode/disk-tools/download38.html"); d.add(36, 1, "多国语言处理", "/sourcecode/chinese/download37.html"); d.add(102, 1, "FlashMX/Flex源码", "/sourcecode/flashMX/download103.html"); d.add(183, 1, "并行计算", "/sourcecode/mpi/download184.html"); d.add(103, 1, "书籍源码", "/sourcecode/BookCode/download104.html"); d.add(104, 1, "Delphi控件源码", "/sourcecode/Delphi-VCL/download105.html"); d.add(123, 1, "
操作系统
开发", "/sourcecode/OS/download124.html"); d.add(128, 1, "中间件编程", "/sourcecode/middleware/download129.html"); d.add(200, 1, "MacOS编程", "/sourcecode/MacOS/download201.html"); d.add(2, 0, "电子书籍", "/ebook/download3.html"); d.add(157, 2, "VC书籍", "/ebook/VisaulC-Books/download158.html"); d.add(158, 2, "Java书籍", "/ebook/Java-Books/download159.html"); d.add(159, 2, "
Delphi
/CppBuilder", "/ebook/
Delphi
-Books/download160.html"); d.add(170, 2, "软件工程", "/doc/Software-Engineering/download171.html"); d.add(194, 2, "认证考试资料", "/ebook/Certification/download195.html"); d.add(160, 2, "其他书籍", "/ebook/Other-Books/download161.html"); d.add(3, 0, "文章/文档", "/doc/download4.html"); d.add(147, 3, "软件设计/软件工程", "/doc/Software-Engineering/download148.html"); d.add(85, 3, "文件格式", "/doc/FileFormat/download86.html"); d.add(89, 3, "技术管理", "/doc/Project-Manage/download90.html"); d.add(164, 3, "行业发展研究", "/doc/download165.html"); d.add(165, 3, "人物传记/成功经验", "/doc/IT-Hero/download166.html"); d.add(92, 3, "通讯编程文档", "/doc/Comm/download93.html"); d.add(105, 3, "系统设计方案", "/doc/project/download106.html"); d.add(202, 3, "软件测试", "/doc/testing/download203.html"); d.add(77, 1, "其他", "/sourcecode/others/download78.html"); document.write(d); d.openAll(); </script>
提示:您可以先修改部分代码再运行
本文来源:
http://www.gdgbn.com/zhufuduanxin/28197/
上一篇:
[经典手机]经典Page翻页分页css代码
下一篇:
【phpstudy】php 经典分页实现代码
相关推荐
[phpstudy]php 防sql注入过滤代码
【jquery ajax】jQuery join详细说明与实例代码
asp中获取指定字符_asp中获取指定区域内容代码
php查询mysql数据表记录数|php查询mysql数据表记录实现代码
json_js 读写cookie实现代码
asp.net_asp XMLHTTP备案信息查询程序
asp开发环境|asp开发中常用函数
jquery如何设置按钮的disabled属性值|jquery如何设置按钮的disabled属性
php获取当前时间_php常用获取 apache信息函数
【phpstudy】php 符转换为 HTML 实体
网友关注
jquery ajax|jquery parents 实现代码与说明
[常用的asp文件与文件扩展名]常用的asp文件与文件夹操作函数
简单ajax读取数据类型|简单ajax读取数据实现代码
【在字符常量中】字符前加上反斜杠,包括 单引号、双引号、反斜杠 php代码
[phpstudy]php header函数实现代码
[一款可以雷达锁定的飞机游戏]一款完整asp验证码程序
随机选取列表中的一个字符串|生成随机字符串,包含大写、小写字母、数字php代码
phpstudy_php ajax 文件上传实现代码
【phpstudy】php 301重定向代码
[php日期处理函数计算时间差转换时间戳]php日期处理函数(计算时间差,转换时间戳日期)
热门标签
最新经典短信
经典短信
【phpstudy】php 经典分页实现代码
经典短信
[javascript学习指南]javascript 经典树型折叠菜单代码
经典短信
[经典手机]经典Page翻页分页css代码
经典短信
【经典php分页代码下载】经典php分页代码(支持数字偏移)
经典短信
phpstudy|php 经典的分页代码类
经典短信
【div css 布局】div+css 二级下拉菜单导航代码
经典短信
【ps照片调色技巧】ps照片美化调色教程
经典短信
【php随机生成数字】5种php生成swf 文件代码
经典短信
[经典php分页代码下载]经典php分页代码与分页原理
经典短信
adidas经典款|几款经典php分页程序
经典短信热门文章
经典短信
【phpstudy】php 经典分页实现代码
声明:本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
Copyright©2006-2019 编程学习网 www.gdgbn.com 版权所有