Histórico da janela.forward()
Exemplo
Crie um botão de encaminhamento em uma página:
<button onclick="history.forward()">Go Forward</button>
A saída do código acima será:
Clique em Avançar para ver como funciona.
(Só funcionará se existir uma próxima página na sua lista de histórico)
Definição e uso
O history.forward()
método carrega a próxima URL (página) na lista de histórico.
O history.forward()
método só funciona se existir uma próxima página.
Observação
history.forward()
é o mesmo que history.go(1)
.
history.forward()
é o mesmo que clicar em "Avançar" no seu navegador.
Veja também:
Sintaxe
history.forward()
Parâmetros
NENHUM |
Valor de retorno
NENHUM |
Suporte ao navegador
history.forward()
é suportado em todos os navegadores:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | Yes | Yes | Yes | Yes | Yes |