|
@@ -0,0 +1,29 @@
|
|
|
|
+<!DOCTYPE html>
|
|
|
|
+<html lang="en">
|
|
|
|
+ <head>
|
|
|
|
+ <meta charset="UTF-8" />
|
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
+ <title>Document</title>
|
|
|
|
+ </head>
|
|
|
|
+ <body>
|
|
|
|
+ <!--
|
|
|
|
+ back() 加载 history 列表中的前一个 URL
|
|
|
|
+ forward() 加载 history 列表中的下一个 URL
|
|
|
|
+ go(num) 加载 history 列表中的某个具体页
|
|
|
|
+ -->
|
|
|
|
+ <a href="./4_1.history.html">附页</a>
|
|
|
|
+ <button id="btn1">下一页</button>
|
|
|
|
+ <button id="btn2">上一页</button>
|
|
|
|
+ <script>
|
|
|
|
+ var btn1 = document.getElementById("btn1");
|
|
|
|
+ btn1.onclick = function(){
|
|
|
|
+ // history.forward();
|
|
|
|
+ history.go(1)
|
|
|
|
+ }
|
|
|
|
+ var btn2 = document.getElementById("btn2");
|
|
|
|
+ btn2.onclick = function() {
|
|
|
|
+ history.go(1);
|
|
|
|
+ }
|
|
|
|
+ </script>
|
|
|
|
+ </body>
|
|
|
|
+</html>
|