哪位高手知道从数据库中读取数据动态生成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); };
|