JavaScript -- History

时间:2023-03-09 05:59:52
JavaScript -- History

-----042-History.html-----

 <!DOCTYPE html>
 <html>
 <head>
     <meta http-equiv="content-type" content="text/html; charset=utf-8">
     <title>标题</title>
 </head>
 <body>
 <script type="text/javascript">
     document.write("共有历史记录条数:" + history.length);
 </script>
 <button onclick="history.back()">后退</button>
 <button onclick="history.forward()">前进</button><br/>
 <input type="text" name="txt">
 <button onclick="history.go(txt.value)">跳转到</button>
 <!-- 只有IE Opera支持 -->
 </body>
 </html>

JavaScript -- History