Histórico da janela
O objeto do histórico da janela
O objeto histórico contém as URLs visitadas pelo usuário (na janela do navegador).
O objeto history é uma propriedade do objeto window .
O objeto histórico é acessado com:
window.history
ou apenas history
:
Exemplos
let length = window.history.length;
let length = history.length;
Propriedades do Objeto Histórico
Property | Description |
---|---|
length | Returns the number of URLs (pages) in the history list |
Métodos de objetos históricos
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 |