亘古微博
咨询邮箱:nicholas@anycle.com
您的位置:网站首页 > 新闻动态 > 网络专题 >
[JS] Window History
来源:未知 作者:admin 发表于:2015-03-11 14:40  点击
window.history include visit history.
 
Window History
window.history could without window while using.
In order to protect user info, there is some limit for this object window.history. 


Functions: 
history.back() -Same as back button of browser;
history.forward() - Same as forward button of browser;


Window History Back
history.back() Load the last URL of history;

Example:
<html>
<head>
<script>
function goBack()
  {
  window.history.back()
  }
</script>
</head>
<body>
<input type="button" value="Back" onclick="goBack()">
</body>
</html>
 
 
Window History Forward
history forward() Load the next URL of history.
 

 
Example:
<html>
<head>
<script>
function goForward()
  {
  window.history.forward()
  }
</script>
</head>
<body>
 
<input type="button" value="Forward" onclick="goForward()">
 
</body>
</html>
 
 

相关文章推荐
[JS] Louver effect by jQuery

This is a simple solution of louver effect....

[JS] event.preventDefault()

This function will notify Web browser not to perform the default action ...

[JS] How to stop animation of CSS3

There is something wrong while I am trying to stop the animation which is running...

[PHP] isv.invalid-signature of Alibaba api

There is a project with open access platform of Alibaba which submit data need to...

[C] ‘for’ loop initial declarations are

create_tree.c:8:2: error: ‘for’ loop initial declarations are only allowed in...

[JS] indexOf()

Function indexOf() return the position of substr from the string....