写错了,应该是dtree控件。不好意思

解决方案 »

  1.   

    用别的控件实现也可以,主要是动态实现,我没法在jsp中循环调用js代码来增加节点。
      

  2.   

    算了,用msn把
    我的是[email protected]
      

  3.   

    有的朋友也请穿我一份!
    谢谢![email protected]
      

  4.   

    楼主或楼上的发一份  谢谢  [email protected]
      

  5.   

    blackpark(暖咖啡) 谢谢,我看看。
      

  6.   

    哪位兄弟有,再发一份树形的吧,blackpark(暖咖啡)发的不是树形的。请各位帮忙顶顶吧,谢谢了。
      

  7.   

    谢谢,哪位兄弟有树形菜单的源代码也请发我一份。     [email protected]谢谢了!!!
      

  8.   

    [email protected]
    我也要,呵呵。谢谢。研究研究!~~
      

  9.   

    哪为老兄有呀,以前肯定有人用过的。我早就想看看这方面的代码了,谁有呀,[email protected]
      

  10.   

    哪位老兄有也发我一份啊研究研究。
    [email protected]
      

  11.   

    我有,但发得太烦了,你去dtree的官方网站下载就可以了...里面有实例的...只要把dree嵌入到jsp代码里...就ok了.......................
      

  12.   

    pdw2009(捡垃圾去上网) ,有动态的吗?可以增删改的,谢谢。
      

  13.   

    <html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <script src="alai_win_2k.js"></script>
    <script src="alai_tree.js"></script>
    <title></title>
    <style type="text/css">
    <!--
    body {
    background-image:  url(Image/shouyezuo.jpg);
    }
    -->
    </style></head><body>
    <div id="Layer1" style="position:absolute; left:12px; top:38px; width:137px; height:38px; z-index:1">
      <table width="136" height="36" border="0" align="left">
        <tr>
          <td >&nbsp;</td>
          <td scope="col"><div nowrap="true" id="divTree1"></div></td>
        </tr>
      </table>
    </div>
    <p align="right">&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>
      <script>
    /***************************************
    目录树控件应用示例
    *******************************************/
    //建立ImageList控件,并添加相关图标
    var icons=new alai_imagelist()
    icons.path="images/"
    icons.type="gif"
    icons.add("xitongfuwu") 
    icons.add("xitongfuwu-x") 
    icons.add("jiankongfuwu") 
    icons.add("jiankongfuwu-x")
    icons.add("yonghu") 
    icons.add("yonghu-x") 
    icons.add("shenpi") 
    icons.add("shenpi-x")
    icons.add("juese") 
    icons.add("juese-x") 
    icons.add("jiankongyuan") 
    icons.add("jiankongyuan-x")
    icons.add("SIM") 
    icons.add("SIM-x") /*开始构建目录树*/
    var tree1=new alai_tree(icons,18,divTree1)/********************************************
     以下代码演示灵活地使用各种添加目录节点的方法
    *********************************************/
    var root=tree1.root
    var n1=tree1.add(root,"","","","xitongfuwu","expand")
        n10=tree1.add(n1,"","","","yonghu","url","xt-yonghu.jsp")
        n11=tree1.add(n1,"","","","shenpi","url","xt-shenpi.jsp ")
        n12=tree1.add(n1,"","","","juese","url","xt-juese.jsp")
    var n2=tree1.add(root,"","","","jiankongfuwu","expand")
    n20=tree1.add(n2,"","","","jiankongyuan","url","jk-jiankongyuan.jsp")
    n21=tree1.add(n2,"","","","SIM","url","jk-simka.jsp")
    /*在新窗口中打开目录树的链接*/
    tree1.target="mainFrame"
    /*收缩目录树*/
    tree1.expandToTier(2)
    tree1.onclick=function(node)
    {
       if (node==n1)
          {
          parent.document.title="系统管理-〉系统服务";
      }
    else if(node==n10)
             {
             parent.document.title="系统管理->用户信息";
              }  
         else if(node==n11)
             {
             parent.document.title="系统管理->审批 ";
              }
     else if(node==n12)
             {
             parent.document.title="系统管理->角色";
              }   
         else if(node==n2)
             {
             parent.document.title="系统管理->监控服务";
              }
     else if(node==n20)
             {
             parent.document.title="系统管理->监控员";
     }
     else if(node==n21)
             {
             parent.document.title="系统管理->SIM卡";
              }  
            return true;                            
    }
    /*简单的目录树事件处理*/
    tree1.onblur=tree1.onfocus=function(node) 
    { if (node==n1)

    n1.icon.src=icons.item["xitongfuwu-x"].src
    n2.icon.src=icons.item["jiankongfuwu"].src
    n10.icon.src=icons.item["yonghu"].src
    n11.icon.src=icons.item["shenpi"].src
    n12.icon.src=icons.item["juese"].src
    n20.icon.src=icons.item["jiankongyuan"].src
    n21.icon.src=icons.item["SIM"].src}
    else if (node==n2)
    {
    n1.icon.src=icons.item["xitongfuwu"].src
    n2.icon.src=icons.item["jiankongfuwu-x"].src
    n10.icon.src=icons.item["yonghu"].src
    n11.icon.src=icons.item["shenpi"].src
    n12.icon.src=icons.item["juese"].src
    n20.icon.src=icons.item["jiankongyuan"].src
    n21.icon.src=icons.item["SIM"].src
    }
    else if (node==n10)
    {
    n1.icon.src=icons.item["xitongfuwu"].src
    n2.icon.src=icons.item["jiankongfuwu"].src
    n10.icon.src=icons.item["yonghu-x"].src
    n11.icon.src=icons.item["shenpi"].src
    n12.icon.src=icons.item["juese"].src
    n20.icon.src=icons.item["jiankongyuan"].src
    n21.icon.src=icons.item["SIM"].src
    }
    else if (node==n11)
    {
    n1.icon.src=icons.item["xitongfuwu"].src
    n2.icon.src=icons.item["jiankongfuwu"].src
    n10.icon.src=icons.item["yonghu"].src
    n11.icon.src=icons.item["shenpi-x"].src
    n12.icon.src=icons.item["juese"].src
    n20.icon.src=icons.item["jiankongyuan"].src
    n21.icon.src=icons.item["SIM"].src
    }
    else if (node==n12)
    {
    n1.icon.src=icons.item["xitongfuwu"].src
    n2.icon.src=icons.item["jiankongfuwu"].src
    n10.icon.src=icons.item["yonghu"].src
    n11.icon.src=icons.item["shenpi"].src
    n12.icon.src=icons.item["juese-x"].src
    n20.icon.src=icons.item["jiankongyuan"].src
    n21.icon.src=icons.item["SIM"].src
    }
    else if (node==n20)
    {
    n1.icon.src=icons.item["xitongfuwu"].src
    n2.icon.src=icons.item["jiankongfuwu"].src
    n10.icon.src=icons.item["yonghu"].src
    n11.icon.src=icons.item["shenpi"].src
    n12.icon.src=icons.item["juese"].src
    n20.icon.src=icons.item["jiankongyuan-x"].src
    n21.icon.src=icons.item["SIM"].src
    }
    else if (node==n21)
    {
    n1.icon.src=icons.item["xitongfuwu"].src
    n2.icon.src=icons.item["jiankongfuwu"].src
    n10.icon.src=icons.item["yonghu"].src
    n11.icon.src=icons.item["shenpi"].src
    n12.icon.src=icons.item["juese"].src
    n20.icon.src=icons.item["jiankongyuan"].src
    n21.icon.src=icons.item["SIM-x"].src
    }}
    /*程序代码浏览窗口*/
    var script=document.getElementsByTagName("SCRIPT")
    var sCode=script[2].innerHTML
    sCode=sCode.replace(/</g,"&lt;").replace(/>/g,"&gt;")
    sCode=sCode.replace(/([A-Za-z0-9><_\)\(\]\[\}\{\. \$/;=\+\?&:-]{2,})/g,"<font color='green'>$1</font>");
    sCode=sCode.replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;")
    sCode=sCode.replace(/(\/\*)/g,"<font color='maroon'>$1")
    sCode=sCode.replace(/(\*\/)/g,"$1</font>")
    sCode=sCode.replace(/\n/g,"<br>")
    /* The End */
      </script>
    </p>
    </body>
    </html>
      

  14.   

    jiajia_2008year(那年三月):谢谢。有可以增删改的吗?我去找找阿赖树
      

  15.   

    俺也想要!不胜感激![email protected]
      

  16.   

    我自己用dtree做了一个例子,没有编辑功能,只有显示功能。哪位能再给我改一改,谢谢!
    <%@ page contentType="text/html; charset=GBK" %>
    <%@ page import="java.util.*" %>
    <jsp:useBean id="dirm" scope="page" class="hnlwdzzw.zfbg.ywgn.grbg.DIRManager"/><%%>
    <html>
    <head>
    <title>文件列表</title>
    <meta http-equiv="Content-Type" content="text/html; charset=GBK">
    <link href="../css/ywgncss.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="dtree.js"></script></head><body class="bodystyle02" topmargin="1"> <%
    out.println("<div class='dtree'>");
    out.println("<script type='text/javascript'>");
    out.println("d = new dTree('d')");
    ArrayList al=dirm.getAllIDIRInfo("123");
    int totalrds= al.size();
    for (int i=0;i<totalrds;i++){
    HashMap hsmp = (HashMap)al.get(i);
    String dir_id=hsmp.get("DIR_ID").toString();
    String dir_pid=hsmp.get("DIR_PID").toString();
    String dir_name=hsmp.get("DIR_NAME").toString();
    String dir_url=hsmp.get("DIR_URL").toString();
    out.println("d.add('"+dir_id+"','"+dir_pid+"','"+dir_name+"','"+dir_url+"');");
    }
    out.println("document.write(d);");
    out.println("</script>");
    out.println("</div>");
    %></body>
    </html>
      

  17.   

    谁有,我也想要一份谢先!!![email protected]
      

  18.   

    去www.knowsky.com      jsp版快那里有个树性目录的教程!
      

  19.   

    帮我也传一份,谢谢^_^[email protected]
      

  20.   

    应该去javascript版看,搜索一下“树”,超级多!!!