Thursday 26 February 2015

Get Back To Previous Page

<button type="button" onclick="history.back();">Back</button>

Other Things

back()                 Loads the previous URL in the history list.

forward()          Loads the next URL in the history list.

go()                         Loads a specific URL from the history list.

Side note: this is straight Javascript, not jQuery. There are completely history plugins designed using the jQuery plugin framework, but they are meant to handle ajax and your history (to not break the back button on a single page that behaves as many pages)

No comments:

Post a Comment