如果是在web中应用,完全可以采用vb中的ListTree 控件了,在VBscript 中。
就是java中,也可以使用java的ListTree 类呀。

解决方案 »

  1.   

    javascript + jsp 参见www.csunsoft.com
      

  2.   

    利用Javascript/*----------------------------------------------------------------------------\
    |                           WAS Tree List (1.0)                               |
    |-----------------------------------------------------------------------------|
    | 基于对象方式构建树表组件,将数据分离,以XMLHTTP方式动态获取, 运行在IE5+。   |
    |-----------------------------------------------------------------------------|
    | 2003-10-20 | 从Tree Widget 1.17抽取基础代码,加以XMLHTTP及多列功能。        |
    | 2003-10-22 | 将NODEID从XML中解析,设置可隐藏字段,设定数据URL。             |
    | 2003-10-25 | 各列数据关联URL。                              |
    | 2003-10-30 | 动、静态及和树表间切换时BUG和显示风格的修整;在与维护页面整合时 |
    |            | 一些方法的调整及新增                                           |
    |-----------------------------------------------------------------------------|
    | Dependencies: css/WasTreeList.css; treelist/*.gif                           |
    |-----------------------------------------------------------------------------|
    | Created 2003-10-20     | Author: Bingle Pen.    |   Last Updated 2003-10-30 |
    \----------------------------------------------------------------------------*/
    //树的静态属性及方法
    WasTreeListHandler = {
      rootID                : 0,
    nextID       : 0,
      pathIndex             : -1,
    getUniqueID     : function() { return this.nextID++; },
    allTrees       : new Array(),
    forPrefixs            : new Array(),
    preventRowClick     : false,
    dataAction            : "com.detong.ibms.menu.action.MenuAction",
    dataUrl               : "http://localhost:7001/ibms/dxmltreeaction",
    prefixID              : "parentid",
    prefixAction          : "action",
    isDBClickSelected     : false,
      

  3.   

    imgConnectMore     : 'connect.more.gif',
    imgConnectEnd     : 'connect.end.gif',
    imgConnectBridge   : 'connect.bridge.gif',
    imgHandleCollapseMore : 'handle.collapse.more.gif',
    imgHandleCollapseEnd : 'handle.collapse.end.gif',
    imgHandleExpandMore : 'handle.expand.more.gif',
    imgHandleExpandEnd : 'handle.expand.end.gif',
    imgEmpty       : 'empty.gif',
    imgIconDefault   : 'icon.folder.gif', callExpand     : function(treeID, nodeID) {this.allTrees[treeID].allNodes[nodeID].expand();},
    callCollapse     : function(treeID, nodeID) {this.allTrees[treeID].allNodes[nodeID].collapse();},
    callRowClick     : function(treeID, nodeID) {this.allTrees[treeID].allNodes[nodeID].click();},
      addPrefix             : function(name,value)     {this.forPrefixs[this.forPrefixs.length] = "&"+name+"="+value;},
      xmlHTTPStateChange    : function(treeID, nodeID) {this.allTrees[treeID].allNodes[nodeID].xmlCallback();},
      dbClick               : function(sID)            {if (WasTreeListHandler.isDBClickSelected) this.select(sID);},
      click                 : function(sID)            {if (!WasTreeListHandler.isDBClickSelected) this.select(sID);},
    onSelect              : function(sID)            {/** 外部接口,被选中事件触发 **/},
    onLoadDataEnd         : function()               {/** 外部接口,装载完毕事件触发 **/},
      select                : function(sID,bNotAction) {
                                if (sID == WasTreeListHandler.rootID) return;
                                if (WasTreeList.selectedID!="undefined" 
                                    && WasTreeList.selectedID!=null) {