<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> </head> <body> <input type="button" id="a" value="点击跳转上一个" onclick="forward()"/> <input type="button" id="b" value="点击跳转下一个" onclick="back()"/> <a href="js10.html">点击跳转10</a> <a href="js13.html">点击跳转13</a> <!--History对象--> <script> var len=history.length; alert(len) function forward(){ history.forward() } function back(){ history.back() } </script> </body> </html>