相信很多人都用过DTREE树型菜单,我也是比较喜欢这个,但是我用了后老板要我修改这个Dtree,要求给结点增加有键功能,可以修改节点名,删除节点,增加子节点。
   很麻烦啊,有高手做过的可以给点意见,不甚感谢!下面是调用的例子,调用真的很方便,但是修改真的很难,郁闷
  <script type="text/javascript">
  <!--
  d = new dTree('d');
  d.add(0,-1,'My example tree');
  d.add(1,0,'Node 1','example01.html');
  d.add(2,0,'Node 2','example01.html');
  d.add(3,1,'Node 1.1','example01.html');
  d.add(4,0,'Node 3','example01.html');
  d.add(5,3,'Node 1.1.1','example01.html');
  d.add(6,5,'Node 1.1.1.1','example01.html');
  d.add(7,0,'Node 4','example01.html');
  d.add(8,1,'Node 1.2','example01.html');
  d.add(9,0,'My Pictures','example01.html','Pictures I\'ve taken over the years','','','img/imgfolder.gif');
  d.add(10,9,'The trip to Iceland','example01.html','Pictures of Gullfoss and Geysir');
  d.add(11,9,'Mom\'s birthday','example01.html');
  d.add(12,0,'Recycle Bin','example01.html','','','img/trash.gif');
  document.write(d);
  //-->
 </script>

解决方案 »

  1.   

    我也在找这个右键功能,网上有一个说是DTEEE右键菜单,可是不知道怎么用,给你个地址你看看,要是能实现了告诉我一下阿。
    http://zc4530.blog.51cto.com/96735/29725
      

  2.   

    好像没有提供直接的方法,不过应该可以走个弯路d.add(0,-1, 'My   example   tree " onclick="f()');
    不一定是这样写,也就是这个意思,可以看源代码纠正一下就是类似于以前那个sql语句字符串连接的bug