Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

history

The history property of the Window object provides reference to the History object which can access and manipulate the user's browser navigation history.

Syntaxwindow.history
<script> function navHist(num) { window.history.go(num); } </script> <button onclick="navHist(-1)">Back 1 page</button> <button onclick="navHist(+1)">Forward 1 page</button> <button onclick="navHist(-2)">Back 2 pages</button> <button onclick="navHist(+2)">Forward 2 pages</button>

JavaScript

Properties

bodycalleeclosedcookiedocumentdropEffecteffectAllowedfilesframeElementframeshistoryInfinityinnerHeightinnerHTMLinnerWidthlengthlocationlocationbarnameNaNnavigatornullopenerouterHeightparentprototypescreenstatetextContentundefined