jQuery MiniUI

 找回密码
 立即注册
查看: 4362|回复: 1
打印 上一主题 下一主题

tree树形目录显示成列表形式的了....... [复制链接]

Rank: 1

跳转到指定楼层
楼主
发表于 2013-9-24 10:57:10 |只看该作者 |倒序浏览
我建立的数据库..理想 的应该是这样


我的是这样的



代码如下
  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>
复制代码
求指导谢谢了
附件: 你需要登录才可以下载或查看附件。没有帐号?立即注册

Rank: 8Rank: 8

沙发
发表于 2013-9-24 11:01:51 |只看该作者
看下你数据的格式
树形的话设置resultAsTree="true"

Archiver|普加软件

GMT+8, 2025-7-11 05:34 , Processed in 1.048437 second(s), 11 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部