参考资料:
http://www.treejs.cn/v3/main.php#_zTreeInfo
http://www.treejs.cn/v3/main.php#_zTreeInfo
<ul id="treeDemo2" class="ztree"></ul>
zTreeObj2 = $.fn.zTree.init($("#treeDemo2"), setting2, zNodes);
var zNodes = ${hrJson};
var setting2 = {
view: {
selectedMulti: false
},
edit: {
enable: false,
editNameSelectAll: true,
removeTitle: '删除 ',
renameTitle: '重命名'
},
data: {
keep: {
parent: true,
leaf: true
},
simpleData: {
enable: true
}
}, callback: {
onClick: zTreeOnClick2 //树单击事件
/*onRename: zTreeOnRename*/
}
};