哦,SORRY,我的MSN潜水了。定位到某个节点,这个方法已有,用focus() + expand() 可以定位到某个节点并展开节点,但原来发布的版本里没写状态跨页面保存的功能,因此得新加上去。
    你可以在页面关闭的时候用 tree.currentNode.sourceIndex 把当前树里的焦点节点的信息提出来存到cookie里,然后在页面加载的时候加载这个信息。
    不过这人信息并不是可以直接拿来用的,要有所改动,比如你取回了 sourceIndex 之后要这样做。
var sid = sourceIndex.substr(sourceIndex.indexOf(tree.divider) + tree.divider.length)
tree.focus(sid);
var id = tree.nodes[sourceIndex].getAttribute("index");
if(id) tree.expand(id, true);  //这里的id 与你看到的 sourceIndex 是两套东西