Moving backward and forward through the user's history is done using the
back()
, forward()
, and go()
methods.Moving forward and backward
To move backward through history, just do:
window.history.back();
This will act exactly like the user clicked on the Back button in their browser toolbar.
Similarly, you can move forward (as if the user clicked the Forward button), like this:
window.history.forward();
No comments:
Post a Comment