-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathajx1.html
66 lines (63 loc) · 1.88 KB
/
ajx1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<!-- 他这是在wmpser里面建了应该文件夹库 -->
</head>
<body>
<!--
首先是一堆列表ul然后是ul里面的li,
然后li里面有个h2,h2里面包裹着一个<a>标签
然后是第二级标题
-->
<ul>
<li>
<h2><a href="#">主标题1111</a></h2>
<ul>
<li><a href="#">副标题1111</a></li>
<li><a href="#">副标题1111</a></li>
</ul>
</li>
<li>
<h2><a href="#">主标题2222</a></h2>
<ul>
<li><a href="#">副标题2222</a></li>
<li><a href="#">副标题2222</a></li>
</ul>
</li>
<li>
<h2><a href="#">主标题3333</a></h2>
<ul>
<li><a href="#">副标题3333</a></li>
<li><a href="#">副标题3333</a></li>
</ul>
</li>
</ul>
<!-- 如果有更多这样的结构那这样写就太麻烦了,我们应该使用拼接字符串的方法来实现了,就像左轮播图靠后端盖建表传数据实现 -->
</body>
<script>
//这些就由后端传输过来
[{
"title": "主标题1111",
"href": "http://www.baidu.com",
"child": [{
"title": "副标题1111",
"href": "http://www.baidu.com"
}, {
"title": "副标题2222",
"href": "http://www.baidu.com"
}]
}, {
"title": "主标题1111",
"href": "http://www.baidu.com",
"child": [{
"title": "副标题1111",
"href": "http://www.baidu.com"
}, {
"title": "副标题2222",
"href": "http: //www.baidu.com"
}]
}]
</script>
</html>