| 
注册时间2012-7-1最后登录2013-10-29阅读权限10积分410精华0帖子121
 
  
 | 
| niko 发表于 2012-7-14 09:58  tree3.filter(function(node){
 if(node.n=="Tree") return true;
 });
我试了 还是不行呢
 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <title>创建树形</title>
 <meta http-equiv="content-type" content="text/html; charset=UTF-8" /><link href="../demo.css" rel="stylesheet" type="text/css" />
 
 <script src="../../scripts/jquery-1.6.2.min.js" type="text/javascript"></script>
 <script src="../../scripts/miniui/miniui.js" type="text/javascript"></script><link href="../../scripts/miniui/themes/default/miniui.css" rel="stylesheet" type="text/css" />
 <link href="../../scripts/miniui/themes/icons.css" rel="stylesheet" type="text/css" />
 <script src="../../scripts/boot.js" type="text/javascript"></script>
 
 </head>
 <body>
 <ul id="tree3" class="mini-tree" style="width:300px;padding:5px;"
 showTreeIcon="true" textField="text" idField="id" >
 </ul>
 
 <script type="text/javascript">
 mini.parse();
 
 var tree3 = mini.get("tree3");
 
 
 
 tree3.loadData([
 { id: "lists", text: "Lists", expanded: false,
 children: [
 { id: "datagrid", text: "DataGrid" },
 { id: "tree", text: "Tree" },
 { id: "treegrid", text: "TreeGrid " }
 ]
 },
 { id: "layouts", text: "Layouts", expanded: false,
 children: [
 { id: "panel", text: "Panel" },
 { id: "splitter", text: "Splitter" },
 { id: "layout", text: "Layout " }
 ]
 },
 { id: "navigations", text: "Navigations", expanded: false,
 children: [
 { id: "pager", text: "Pager" },
 { id: "tabs", text: "Tabs" },
 { id: "navbar", text: "NavBar" },
 { id: "menu", text: "Menu" }
 ]
 }
 ]);
 
 
 tree3.filter(function (node) {
 var text = node.text;// ? node.text.toLowerCase() : "";
 if (text== "Pager") {
 return true;
 }
 });
 </script>
 
 
 
 <div class="description">
 <h3>Description</h3>
 <p>
 </p>
 </div>
 </body>
 </html>
 这是完整代码  请你帮忙看下子  谢谢了  备注:我做的例子是在最新版的 里面做的
 | 
 |