亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

JavaScript Window History

JavaScript Window History

The window.history object contains the history of the browser.

Window History

The window.history object can be written without using the window prefix.

In order to protect user privacy, JavaScript’s method of accessing this object is restricted.

Some methods:

history.back() - Same as clicking the back button in the browser history.forward() - Same as clicking the forward button in the browser

Window History Back

The history.back() method loads the previous URL in the history list.

This is the same as clicking the back button in the browser:

Create a back button on the page:

<html>
<mate charset="utf-8">
<head>
<script>
function goBack()
  {
  window.history.back()
  }
</script>
</head>
<body>
<input type="button" value="返回" onclick="goBack()">
</body>
</html>

Window History Forward

history forward() method loads the next URL in the history list.

This is the same as clicking the forward button in the browser:

Create a forward button on the page:

<html>
<mate charset="utf-8">
<head>
<script>
function goForward() 
 { 
  window.history.forward() 
   }
</script>
</head>
<body>
  <input type="button" value="下頁" onclick="goForward()">
</body>
</html>


Continuing Learning
||
<html> <mate charset="utf-8"> <head> <script> function goBack() { window.history.back() } </script> </head> <body> <input type="button" value="返回" onclick="goBack()"> </body> </html>
submitReset Code