做的树是监控车辆上线 下线的 跟QQ样。
是用jquery 传json文件做出来的
现在是setInterval('treeReload()', 1000 * 60); 一分钟刷一次。但是每次都是全部清除了 再取新数据。
想弄的跟QQ 那样  有上线车辆 就光加上线的  有下线的就光删下线的。
$(function(){
$('#carList').tree({
checkbox:false,
    animate:true,
url:'OnlineServlet?method=list&id=-1',
onLoadSuccess:function(te){
var node = $('#carList').tree('getRoots');
document.getElementById("len").innerHTML= node.length;

},
onBeforeLoad:function(node){

// 这个判断很重要,对于根节点的加载来说
if(node&&node.id){
$(this).tree('options').url = "OnlineServlet?method=list&id="+node.id;
}
}
}
});
});