Historique de la fenêtre
L'objet historique de la fenêtre
L' objet historique contient les URL visitées par l'utilisateur (dans la fenêtre du navigateur).
L' objet history est une propriété de l' objet window .
L' objet historique est accessible avec :
window.history
ou juste history
:
Exemples
let length = window.history.length;
let length = history.length;
Propriétés de l'objet d'historique
Property | Description |
---|---|
length | Returns the number of URLs (pages) in the history list |
Méthodes d'objet d'historique
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 |