Possible Duplicate:
Go Back to Previous Page
get back to previous page
How to get the previous page in javascript coding. Go to the previous page when click that back button.
Here is the code
<input type="button" value="Back" onclick="window.history.back()" />
You can either use:
<button onclick="window.history.back()">Back</button>
or..
<button onclick="window.history.go(-1)">Back</button>
The difference, of course, is back()
only goes back 1 page but go()
goes back/forward the number of pages you pass as a parameter, relative to your current page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With