detail.html
816 Bytes
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
<div id="navigation-detail" class="page out" data-title="URL列表详情">
<div id="navigation-detail-header"></div>
<div id="navigation-detail-a"></div>
</div>
<script>
require(["NavHeader", "Html"], function(NavHeader, Html) {
function getParam(key){
var result = "";
var hash = location.hash;
if(location.hash.indexOf("?" != -1)){
location.hash.split("?")[1].split("&").forEach(function(item){
var splits = item.split("=");
if(key == splits[0]){
result = splits[1];
return;
}
});
}
return decodeURIComponent(result);
};
new NavHeader({
el: "navigation-detail-header",
data: {
title : "菜单"+getParam("type")
}
}).render();
new Html({
el: "navigation-detail-a",
data: {
"htm": "这是菜单"+getParam("type")
}
}).render();
});
</script>