var ids=[]; ids=getChildren(ids, treeNode);//TreeNode是选中节点,ids是子节点id数组,格式:123,223,4,55 1.获取直接子节点的id //返回值包含选中节点的id,即ids[0] function getChildren(ids, treeNode) { ids.push(treeNode.id);//选中节点id,即父节点id if (treeNode.isParent) { for (var obj in treeNode.c