var setting = {
showLine: true,
callback: {
  beforeClick: zTreeBeforeClick
}
};

 

 

//当前选中的节点
function zTreeBeforeClick(treeId, treeNode, clickFlag) {  


  arrSelected=getChildNodes(treeNode);  

};

function getChildNodes(treeNode) {

var childNodes = zTree.transformToArray(treeNode);
var nodes = new Array();
for(i = 0; i < childNodes.length; i++) {
nodes[i] = childNodes[i].id;
}
return nodes.join(",");
}

posted on 2018-07-26 12:33  麦田守望  阅读(1217)  评论(0编辑  收藏  举报