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

推荐订阅源

M
MIT News - Artificial intelligence
有赞技术团队
有赞技术团队
S
Schneier on Security
aimingoo的专栏
aimingoo的专栏
T
Troy Hunt's Blog
U
Unit 42
Hacker News - Newest:
Hacker News - Newest: "LLM"
V2EX - 技术
V2EX - 技术
T
The Blog of Author Tim Ferriss
V
Visual Studio Blog
H
Heimdal Security Blog
H
Hacker News: Front Page
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Cloudbric
Cloudbric
Google DeepMind News
Google DeepMind News
C
Cisco Blogs
The Cloudflare Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
MyScale Blog
MyScale Blog
F
Fortinet All Blogs
N
News | PayPal Newsroom
Attack and Defense Labs
Attack and Defense Labs
D
DataBreaches.Net
N
News and Events Feed by Topic
Security Archives - TechRepublic
Security Archives - TechRepublic
Forbes - Security
Forbes - Security
Simon Willison's Weblog
Simon Willison's Weblog
F
Full Disclosure
The Register - Security
The Register - Security
L
LINUX DO - 热门话题
Webroot Blog
Webroot Blog
Google Online Security Blog
Google Online Security Blog
AI
AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
I
Intezer
S
Security Affairs
阮一峰的网络日志
阮一峰的网络日志
K
Kaspersky official blog
云风的 BLOG
云风的 BLOG
博客园 - 叶小钗
T
Threatpost
Spread Privacy
Spread Privacy
小众软件
小众软件
AWS News Blog
AWS News Blog
S
Secure Thoughts
S
Security @ Cisco Blogs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks

博客园 - 闲云

Slim通过composer生成脚本问题的解决办法 javac编译项目代码脚本片段 过滤特殊输入字符(Java) PHP的时间总结 设置IE8和Firefox3.0的语言 Javascript中call函数 喵喵 在工作中学习 FlashForward 2006 Austin 获奖名单[转自Dengjie Blog] 利用〔正则〕检查.NET访问数据库Sql的正确性 无计划就不行动! 如何由已知去了解未知? 检验医学信息资源链接 如何恢复IDE默认设置 MSDN Magazine CHM &TchNet CHM下载 不常见程序写法和容易误解的概念 打印-参考例子 VS2005的正则表达式查找/替换 一句话的软件工程
dojo tree的折叠和展开
闲云 · 2010-09-26 · via 博客园 - 闲云

function collapseAll(branches, myTree){

   if(branches == null){     

      if(myTree == null){

         myTree = dijit.byId('MenuTree');

      }

      branches = myTree.rootNode.getChildren();

   }

   var branch;

   for(var i = 0; i<branches.length; i+=1){

      branch = branches[i];       

      collapseAll(branch.getChildren(), myTree);

      myTree._collapseNode(branch);

   }

}

function expandAll(branches,myTree){

if(branches == null){     

   if(myTree == null){

      myTree = dijit.byId('MenuTree');

   }

   branches = myTree.rootNode.getChildren();

}

var branch;

for(var i = 0; i<branches.length; i+=1){

   branch = branches[i];       

   expandAll(branch.getChildren(), myTree);

   myTree._expandNode(branch);

}

}