Back button in javascript

Submitted by:Andery Smith

Date added:22 September, 2012

Category:JavaScript

Allows you to take a user to the previous page they were on using a button

Tags: back button

Code Snippet:

<!-- Javascript button script -->

<!-- Highlight this code then copy and paste into the <body></body> tags where you want the button to appear -->

<input type="button" name="Back" onClick="history.go(-1)" value="Go Back">

<!-- You can replace -1 with -2 -3 etc depending how many pages you want to go back -->
 
 

Comments