Sunday, August 29, 2010

Javascript Go Back Link With History

Here is a really easy way to add a go back link to your page navigation.
This code uses JavaScript to get the browser history for the specific site.

<a href="#" onClick="history.go(-1)">Back</a> 
<input type=button value="Back" onClick="history.go(-1)">


You can change the -1 to any number of pages you need to go back in history :D

No comments:

Post a Comment