{
“name”: “菜单0”,
“url”: “https://img2.baidu.com/it/u=170788176,908879950&fm=253&fmt=auto&app=138&f=JPEG?w=281&h=499”,
“child”: [],
“backgroundImage”: “https://img2.baidu.com/it/u=170788176,908879950&fm=253&fmt=auto&app=138&f=JPEG?w=281&h=499”
},
{
“name”: “菜单1”,
“url”: “https://img0.baidu.com/it/u=1780747315,948203002&fm=253&fmt=auto&app=138&f=JPEG?w=435&h=500”,
“child”: [
{
“name”: “菜单0”,
“url”: “https://img2.baidu.com/it/u=170788176,908879950&fm=253&fmt=auto&app=138&f=JPEG?w=281&h=499”,
“child”: [],
“backgroundImage”: “https://img2.baidu.com/it/u=170788176,908879950&fm=253&fmt=auto&app=138&f=JPEG?w=281&h=499”
}
],
“backgroundImage”: “https://img0.baidu.com/it/u=1780747315,948203002&fm=253&fmt=auto&app=138&f=JPEG?w=435&h=500”
},
{
“name”: “菜单2”,
“url”: “https://img0.baidu.com/it/u=2048261222,989660233&fm=253&fmt=auto?w=800&h=1411”,
“child”: [
{
“name”: “菜单0”,
“url”: “https://img2.baidu.com/it/u=170788176,908879950&fm=253&fmt=auto&app=138&f=JPEG?w=281&h=499”,
“child”: [],
“backgroundImage”: “https://img2.baidu.com/it/u=170788176,908879950&fm=253&fmt=auto&app=138&f=JPEG?w=281&h=499”
},
{
“name”: “菜单1”,
“url”: “https://img0.baidu.com/it/u=1780747315,948203002&fm=253&fmt=auto&app=138&f=JPEG?w=435&h=500”,
“child”: [
{
“name”: “菜单0”,
“url”: “https://img2.baidu.com/it/u=170788176,908879950&fm=253&fmt=auto&app=138&f=JPEG?w=281&h=499”,
“child”: [],
“backgroundImage”: “https://img2.baidu.com/it/u=170788176,908879950&fm=253&fmt=auto&app=138&f=JPEG?w=281&h=499”
}
],
“backgroundImage”: “https://img0.baidu.com/it/u=1780747315,948203002&fm=253&fmt=auto&app=138&f=JPEG?w=435&h=500”
}
],
“backgroundImage”: “https://img0.baidu.com/it/u=2048261222,989660233&fm=253&fmt=auto?w=800&h=1411”
}
]
###### html:
js(需要引入jquery):
$(function (){
init();
closeAndOpen();
});
function closeAndOpen(){
$("body").on("mouseup","li",function (e) {
var children = $(this).find(".menu-ul");
children.toggle(500);
e.stopPropagation();
});
}
function init(){
$(".parent>ul>li>ul").remove();
/* $.ajax({
url: '/test/array',
type: 'GET',
dataType: 'json',
}).done(function (data) {
if (data.rs) {
var res = data.data;
var h1 = "<li>菜单";
h1 =ul(res,h1);
h1+="</li>";
$(".parent>ul").append(h1);
$(".parent>ul>li>ul").hide();
}
}).fail(function () {
});*/
// data为后端传入前端的数据(上面注明了)
var res = data;
var h1 = "<li>菜单";
h1 =ul(res,h1);
h1+="</li>";
$(".parent>ul").append(h1);
// $(".parent>ul>li>ul").hide();
### 最后
除了简历做到位,面试题也必不可少,整理了些题目,前面有117道汇总的面试到的题目,后面包括了HTML、CSS、JS、ES6、vue、微信小程序、项目类问题、笔试编程类题等专题。
![](https://img-blog.csdnimg.cn/img_convert/64ce8432d0f753e43f93972ad19fcd72.png)
![](https://img-blog.csdnimg.cn/img_convert/d508b1ae6a5e7d5e7d5daf668e9eccea.png)