Create Async Tree 的使用

$(document).ready(function (){
    $('#div_tree').tree({
          url: 'userinfo_doUserinfoList?id=0',
          lines:true,
           onClick:function(node){
            if(node.state==null){
                $.ajax({
                    type:"post",
                    dataType:"text",
                    url:"userinfo_doFindGpsInfo?id="+node.id,
                    success: function(data){
                        if(data!=""){
                            var jsonObj= eval('('+data+')');
                            addMarker(jsonObj);
                        }else{
                            map.clearOverlays();
                            alert("没有找到该用户的信息!");
                        }
                    }
                });
            }
               $(this).tree('toggle', node.id);
        }
    });
});

 

http://www.jeasyui.com/documentation/index.php#

各参数、事件详解

posted on 2013-03-12 16:41  风之痕羁  阅读(296)  评论(0编辑  收藏  举报