• zTree删除节点


    zTree 是一个依靠 jQuery 实现的多功能 “树插件”。优异的性能、灵活的配置、多种功能的组合是 zTree 最大优点。

    zTree删除节点.

     1 <!DOCTYPE html>
     2 <HTML>
     3 <HEAD>
     4     <TITLE> ZTREE DEMO - edit</TITLE>
     5     <meta http-equiv="content-type" content="text/html; charset=UTF-8">
     6     <link rel="stylesheet" href="../../../css/demo.css" type="text/css">
     7     <link rel="stylesheet" href="../../../css/zTreeStyle/zTreeStyle.css" type="text/css">
     8     <script type="text/javascript" src="../../../js/jquery-1.4.4.min.js"></script>
     9     <script type="text/javascript" src="../../../js/jquery.ztree.core-3.5.js"></script>
    10     <script type="text/javascript" src="../../../js/jquery.ztree.excheck-3.5.js"></script>
    11     <script type="text/javascript" src="../../../js/jquery.ztree.exedit-3.5.js"></script>
    12     <SCRIPT type="text/javascript">
    13         var setting = {
    14             edit: {
    15                 enable: true,
    16                 showRemoveBtn: function(treeId, treeNode) {
    17                     if(treeNode.level == 0) {
    18                     return false;
    19                     } else {
    20                     return true;
    21                     }
    22                 },
    23                 showRenameBtn: false,
    24                 removeTitle: "删除"
    25             },
    26             data: {
    27                 simpleData: {
    28                     enable: true
    29                 }
    30             },
    31             callback: {
    32                 beforeDrag: beforeDrag
    33             }
    34         };
    35 
    36         var zNodes =[
    37             { id:1, pId:0, name:"父节点 1", open:true},
    38             { id:11, pId:1, name:"叶子节点 1-1"},
    39             { id:12, pId:1, name:"叶子节点 1-2"},
    40             { id:13, pId:1, name:"叶子节点 1-3"},
    41             { id:2, pId:0, name:"父节点 2", open:true},
    42             { id:21, pId:2, name:"叶子节点 2-1"},
    43             { id:22, pId:2, name:"叶子节点 2-2"},
    44             { id:23, pId:2, name:"叶子节点 2-3"},
    45             { id:3, pId:0, name:"父节点 3", open:true},
    46             { id:31, pId:3, name:"叶子节点 3-1"},
    47             { id:32, pId:3, name:"叶子节点 3-2"},
    48             { id:33, pId:3, name:"叶子节点 3-3"}
    49         ];
    50 
    51         function beforeDrag(treeId, treeNodes) {
    52             return false;
    53         }    
    54         $(document).ready(function(){
    55             $.fn.zTree.init($("#treeDemo"), setting, zNodes);
    56         });
    57     </SCRIPT>
    58 </HEAD>
    59 
    60 <BODY>
    61 <div class="content_wrap">
    62     <div class="zTreeDemoBackground left">
    63         <ul id="treeDemo" class="ztree"></ul>
    64     </div>
    65 </div>
    66 </BODY>
    67 </HTML>
  • 相关阅读:
    Windows:多网卡:网卡接口【共享】功能,实现简单的windows【NAT】防火墙
    Windows Server:DHCP 服务:一点总结
    Windows 2003 多网卡MAC网桥功能:依赖于 "DHCP client" 后台服务! 结论错误;以及后续。
    给widnows系统打补丁的感悟
    基于Java的WebService服务端
    Spring 事件记录
    Oracle数据库备份还原相关语句
    基于Java的WebService客户端
    汽车的CAN和LIN总线学习
    eclipse:第一次打开XXX.properties文件时乱码
  • 原文地址:https://www.cnblogs.com/liubeimeng/p/4877184.html
Copyright © 2020-2023  润新知