前言:
重复做毫无意义的东西就叫体力活,创建好模板,需要随时用
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8" />
<title>Document</title>
<link rel="stylesheet" href="indexcss/common/reset.css"/>
<link rel="stylesheet" href="indexcss/common/sdhstyle.css"/>
<link rel="stylesheet" href="css/layui.css"/>
<link rel="stylesheet" href="indexcss/index.css"/>
</head>
<body>
<div class="body">
<div class="cenitem auto">
<ul class="bar jsnav">
<li id="content1">首页</li>
<li id="content2">导航2</li>
<li id="content3">导航3</li>
</ul>
</div>
<div class="cenitem auto">
<section>
</section>
</div>
<div class="cenitem auto">
<footer>
<p class="tc f16">xxxxxxxxxxxx公司</p>
</footer>
</div>
</div>
<script src="js/common/jquery.min.js"></script>
<script src="layui.all.js"></script>
<script src="js/sdh/Game.js"></script>
<script src="js/sdh/Utils.js"></script>
<script src="js/index.js"></script>
<script>
if(GIT.html == null || GIT.html == 'content1'){
$("section").load("html/index/index.html");
$("#content1").addClass("act");
}else if(GIT.html != null){
$("section").load("html/"+GIT.html+"/"+GIT.html+".html");
$("#"+GIT.html).addClass("act");
}
$(".jsnav").on("click","li",function(){
location.href = 'index.html?html='+$(this).attr("id");
})
</script>
</body>
</html>