function getRoot() { var treeObj = $.fn.zTree.getZTreeObj("tree-div"); //返回一个根节点 var node = treeObj.getNodesByFilter(function (node) { return node.level == 0 }, true); }