Historie API
Objekt Historie okna
Objekt historie obsahuje adresy URL navštívené uživatelem (v okně prohlížeče).
Objekt historie je vlastností objektu okna .
K objektu historie se přistupuje pomocí:
window.history
nebo jen history
:
Příklady
let length = window.history.length;
let length = history.length;
Vlastnosti objektu historie
Property | Description |
---|---|
length | Returns the number of URLs (pages) in the history list |
Historie objektů
Method | Description |
---|---|
back() | Loads the previous URL (page) in the history list |
forward() | Loads the next URL (page) in the history list |
go() | Loads a specific URL (page) from the history list |