treedbdata.htm 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title></title>
  5. <script src="../../lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  6. <link href="../../lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  7. <script src="../../lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  8. <script src="../../lib/ligerUI/js/plugins/ligerTree.js" type="text/javascript"></script>
  9. <script type="text/javascript">
  10. $(function ()
  11. {
  12. var data = [];
  13. data.push({ id: 1, pid: 0, text: '1' });
  14. data.push({ id: 2, pid: 1, text: '1.1' });
  15. data.push({ id: 4, pid: 2, text: '1.1.2' });
  16. data.push({ id: 5, pid: 2, text: '1.1.2' });
  17. data.push({ id: 10, pid: 8, text: 'wefwfwfe' });
  18. data.push({ id: 11, pid: 8, text: 'wgegwgwg' });
  19. data.push({ id: 12, pid: 8, text: 'gwegwg' });
  20. data.push({ id: 6, pid: 2, text: '1.1.3', ischecked: true });
  21. data.push({ id: 7, pid: 2, text: '1.1.4' });
  22. data.push({ id: 8, pid: 7, text: '1.1.5' });
  23. data.push({ id: 9, pid: 7, text: '1.1.6' });
  24. $("#tree1").ligerTree({
  25. data:data,
  26. idFieldName :'id',
  27. parentIDFieldName :'pid'
  28. }
  29. );
  30. });
  31. </script>
  32. </head>
  33. <body style="padding:10px">
  34. <div style="width:200px; height:300px; margin:10px; float:left; border:1px solid #ccc; overflow:auto; ">
  35. <ul id="tree1"></ul>
  36. </div>
  37. <div style="display:none">
  38. <!-- 数据统计代码 -->
  39. </div>
  40. </body>
  41. </html>