HTML代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Guan_YuAnAn</title>
<link rel="stylesheet" href="index.css">
</head>
<body>
<header>
<ul>
<li><a href="#/news">news</a></li>
<li><a href="#/about">about</a></li>
<li><a href="#/help">help</a></li>
</ul>
</header>
<div id="router">
<!-- 内容加载区域 -->
</div>
<script src="jquery-3.1.1.js"></script>
<script src="router.js"></script>
<script>
console.log(window.location)
</script>
</body>
</html>
Css代码: