您的位置:首页 > Web前端 > JavaScript

extjs tree 展开节点

2012-03-29 23:20 337 查看
//初始化时展开所有节点

tree.on('load', function(node, checked) {             

  node.expand();                   

  node.eachChild(function(child) {  

  child.expand(); 

           

  });        

 }, tree);

      

//展开某节点的最后一个节点

tree.on('load', function(node, checked) {             

  node.expand();                   

  node.eachChild(function(child) {  

  

      

    if(child.attributes.id < -1) {

      child.expand();

      child.lastChild.expand();

      

    } 

          

  });        

 }, tree);

      

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  tree extjs function