jQueryEasyUI创建菜单主页

function addTab(title,path){  
    funcTab.tabs('add',{  
        title: title,  
        fit:true,  
        href:'${ctx}/login/forword!forwardFramePage.action?_f_url='+path,  
        iconCls:'icon-save',  
        closable:true  
    });  
}  
  
$(function(){  
    menuObj=$('#menu').tree({  
        url:'${ctx}/pm/user/user!displayAccessedModulesByUser.action',  
        animate:true,  
        onClick:function(node){  
                //alert(node.isLeaf);  
                var attributes = node.attributes;  
                if(attributes.isLeaf=="1"){  
                    if(!isExistTab(node.text)){  
                        //alert(attributes.path);  
                        var url = "${ctx}"+attributes.path;  
                        //alert(url);  
                        addTab(node.text,url);  
                    }else{  
                        selectedTab(node.text);  
                    }  
                }else{  
                      
                }  
            },  
        onDblClick:function(node){  
                var attributes = node.attributes;  
                if(attributes.isLeaf=="0"){  
                    $(this).tree('expand',node.target);  
                }  
            }  
    });  
});  
原文地址:https://www.cnblogs.com/azhqiang/p/4054103.html