how do i make a link that does the same thing as your back button?
Printable View
how do i make a link that does the same thing as your back button?
:)Code:<a href="javascript:history.back()">Click here to go back</a>
thanks
also you can add the amount steps you would like to back in.
Just in case you didn't know.
:)
<a href=javascript:history.back(-2)>Back</a>
what's the difference between that and
a href=javascript:history.go(-2)
which is how I was taught...
I was taught history.go as well.
history.go(-2) is the correct way to do this.
history.back() was originally designed to go to the previous page and not take a parameter where as history.go was designed to go to a page from the relative position using a parameter.