var zTree = $.fn.zTree.getZTreeObj(treeId); nodes = zTree.getSelectedNodes(); var node = nodes[0]; // 判断是否是父节点 if(node.isParent){ //判断后做操作 }
var zTree = $.fn.zTree.getZTreeObj(treeId); nodes = zTree.getSelectedNodes(); var node = nodes[0]; // 判断是否是父节点 if(node.isParent){ //判断后做操作 }