惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
罗磊的独立博客
SecWiki News
SecWiki News
The Register - Security
The Register - Security
The GitHub Blog
The GitHub Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Schneier on Security
IT之家
IT之家
博客园 - 聂微东
T
The Exploit Database - CXSecurity.com
Recorded Future
Recorded Future
大猫的无限游戏
大猫的无限游戏
Know Your Adversary
Know Your Adversary
Latest news
Latest news
Vercel News
Vercel News
G
GRAHAM CLULEY
D
DataBreaches.Net
D
Darknet – Hacking Tools, Hacker News & Cyber Security
S
SegmentFault 最新的问题
博客园_首页
雷峰网
雷峰网
T
Tenable Blog
Spread Privacy
Spread Privacy
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
酷 壳 – CoolShell
酷 壳 – CoolShell
Cisco Talos Blog
Cisco Talos Blog
V
Visual Studio Blog
J
Java Code Geeks
博客园 - Franky
The Cloudflare Blog
Apple Machine Learning Research
Apple Machine Learning Research
C
CERT Recently Published Vulnerability Notes
T
Threatpost
Google DeepMind News
Google DeepMind News
F
Fortinet All Blogs
P
Privacy International News Feed
T
Threat Research - Cisco Blogs
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
Recent Announcements
Recent Announcements
Blog — PlanetScale
Blog — PlanetScale
Security Latest
Security Latest
U
Unit 42
M
MIT News - Artificial intelligence
Y
Y Combinator Blog
K
Kaspersky official blog
有赞技术团队
有赞技术团队
B
Blog
腾讯CDC

博客园 - calmzeal

微软更新导致的IIS7设置默认主页无效 【原创】Superset在windows下的安装配置 解决 Linux error while loading shared libraries: cannot open shared object file: No such file or directory 记录一次服务器CPU 100%的解决过程 Google Review中Zlib.Portable报错的一种排查解决方案 sql行转列 VS2010发布.NET2.0网站,出现“未预编译文件* 因此不能请求该文件”的解决办法 在 64 位版本的 Windows 上IIS ASP NET不支持JET4 问题 wse [Web 开发] 定制IE下载对话框的按钮(打开/保存) 【IE信息栏问题】本地html文件js被IE阻止的一些解决方法 SqlPlus Set常用设置 OleDB Transaction ORA-01000: maximum open cursors exceeded 超出打开游标的最大数 【转】神呀~~,给我个"本地数据库的替换方案"吧! 【CLR Via C#笔记】操作符重载 C#单件模式 【CLR Via C#笔记】 类型对象 【CLR Via C#笔记】 值类型与拆装箱、参数传递 [转] CSS完美兼容IE6/IE7/FF的通用方法
分享一个js Tree - dTree
calmzeal · 2009-06-29 · via 博客园 - calmzeal

上周给赵姐做一个报表的目录,要求做一个网页的树形导航或者应用程序的树形导航

刚重装系统,于是偷懒用js Tree来做,网上找到了这个dTree 发现增加节点方法挺方便的就用它了

实际测试400多个节点在我机器上也就是1,2秒钟读入,速度还行

d = new dTree('d');
d.add(Id,parentId,text,url,title,img,target);

由于手头的数据是Excel格式的,树形层次以及存在了

用公式扒拉扒拉把 除了 parentID的其他参数都能拖出来,不过把层次级别能找出来

于是修改新增函数,用层次来添加树,我这只有4层

var iNodeIndex = new Array(0,0,0,0,0);

function AddNodeEx(tree,id,iLv,sText,sUrl,sType)
{
 var sImg='';
 var sHint='';
 if (sType=='.doc') {sImg='img/1'+sType+'.jpg';sHint='Word文档文件';}
 if (sType=='.xls') {sImg='img/1'+sType+'.jpg';sHint='Excel表格文件';}
 if (sType=='软件及数据库') {sImg='img/globe.gif';sHint='软件及数据库';}
 if (sType!='')
        tree.add(id,iNodeIndex[iLv],sText,sUrl,'点击查看,文件类型:'+sHint,'',sImg);
 else
        tree.add(id,iNodeIndex[iLv],sText);
 iNodeIndex[iLv+1]=id;
}

dTree下载