JavaScript » Window » back

Syntax:
window.back()

Using this method is the same as clicking the browser's Back button, i.e. it undoes the last navigation step performed from the current top-level window.

Examples

Code:
<input type="button" value="Go back" onClick="window.back()">
Output:
Explanation:

This example creates a button on the page that acts the same as the browser's back button.