Using the history object
Click a button to go forward or back one page:
Click a button to go forward or back two pages: