jQuery MiniUI

标题: tree树形目录显示成列表形式的了....... [打印本页]

作者: langzimaizan    时间: 2013-9-24 10:57:10     标题: tree树形目录显示成列表形式的了.......

我建立的数据库..[attach]2920[/attach]理想 的应该是这样[attach]2919[/attach]


我的是这样的
[attach]2918[/attach]


代码如下
  1. <html>
  2.         <head>
  3.                 <title>增加、删除、修改节点</title>
  4.                  <link href="../demo.css" rel="stylesheet" type="text/css" />
  5.         </head>
  6. <body>
  7.         <h1>
  8.         增加、删除、修改节点
  9.         </h1>

  10.         <input type="button" value="插入节点(前)" onclick="onAddBefore()" />
  11.         <input type="button" value="插入节点(后)" onclick="onAddAfter()" />
  12.         <input type="button" value="插入节点(子节点)" onclick="onAddNode()" />
  13.         <input type="button" value="保存" onclick="saveData()"
  14.                 style="margin-left:30px;font-weight:bold;" />
  15.         <br />
  16.         <input type="button" value="编辑节点" onclick="onEditNode()" />
  17.         <input type="button" value="删除节点" onclick="onRemoveNode()" />


  18.         <ul id="tree1" class="nui-tree"
  19.                 url="com.primeton.eos.Icomponent.loadtree.biz.ext"
  20.                 style="width:200px;padding:5px;" showTreeIcon="true" textField="name"
  21.                 idField="id" parentField="pid" resultAsTree="false" allowDrag="true"
  22.                 allowDrop="true" dataField="plusFile" expandOnLoad="0">
  23.         </ul>
复制代码
求指导谢谢了

作者: felt    时间: 2013-9-24 11:01:51

看下你数据的格式
树形的话设置resultAsTree="true"




欢迎光临 jQuery MiniUI (http://miniui.com/discuss/) Powered by Discuz! X2