搜索 |
function findNodes(node){
var arr=[];
function done(node){
if(node.children.length!=0){
var childrenNodes=node.children;
for(var index=0;index<childrenNodes.length;index++){
arr.push(childrenNodes[index]);
done(childrenNodes[index]);
}
}
}
done(node)
return arr;
}