Create a forward button on a page:
<button onclick="history.forward()">Go Forward</button>
The output of the code above will be:
Click on Go Forward to see how it works.
(Will only work if a next page exists in your history list)
The history.forward()
method loads the next URL (page) in the history list.
The history.forward()
method only works if a next page exists.
history.forward()
is the same as history.go(1)
.
history.forward()
is the same as clicking "Forward" in your browser.
history.forward()
NONE |
NONE |
history.forward()
is supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!