哪位高手知道从数据库中读取数据动态生成tree!!

解决方案 »

  1.   

    这种有很多哦    例如:dtree就可以实现这个
      

  2.   

    下载地址 
    http://www.destroydrop.com/javascripts/tree/ 
    很多博客都有介绍 
    http://so.csdn.net/BlogSearchResult.aspx?q=dtree&p=0 使用dtree构建动态树型菜单 
    http://blog.csdn.net/esteem/archive/2007/04/20/1571470.aspx
      

  3.   

    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;
    };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);
    };
      

  4.   

    呵呵,我想知道javascript生成树菜单的原理
      

  5.   

    很多很好的开源js树形控件:Dtree、XloadTree
      

  6.   

    这两天我也在弄这个tree,要用xml生成一个tree,然后让javascript执行,头疼啊 !