Easyui Tree方法扩展 - getLevel(获取节点级别)
//扩展方法 $.extend($.fn.tree.methods, { getLevel:function(jq,target){ var l = $(target).parentsUntil("ul.tree","ul"); return l.length+1; } }); //用法 var node = $().tree("getSelected"); var lv = $().tree("getLevel",node.target);