Using this method is the same as clicking the browser's Forward button, i.e. it goes to the next URL in the history list of the current top-level window.
<input type="button" value="Go back" onClick="window.forward()">
This example creates a button on the page that acts the same as the browser's Forward button.