树型菜单无限循环

var json=[{
        name:'A',
        childs:[{
            name:'A-1',
            childs:[{
                name:'A-1-1',
                childs:[{
                    name:'A-1-1-1'  
                }]
            }]
        }]
    },{
        name:'B',
        childs:[{
            name:'B-1',
            childs:[{
                name:'B-1-1'
            }]
        }]
    }];
            
    var j='-';
    var gettree=function(data){
        for(var i=0; i

你可能感兴趣的:(树型菜单无限循环)