Codesupplier.com

free html codes for your website

Back to previous page button

This code allows users to go back a page by clicking a button on your website. When clicked this html code accesses the browsers history and directs the user back to the page they last visited. Great if you running step-by-step instructions on your website.

If you want this code simply copy and paste the below html. Change the text in red to suit you.

<form>
<input type="button" value="Click here to go back to the previous page!"
onClick="javascript: history.go(-1)">
</form>

 

< Go back to Javascript Snippets