History forward()Método
Objeto History
Definición y uso
El método forward() puede cargar la siguiente URL en la lista de historial.
El efecto de llamar a este método equivale a hacer clic en el botón de avance o a llamar a history.go(1).
Sintaxis
history.forward()
Compatibilidad con navegadores
![]()
![]()
![]()
![]()
![]()
Todos los navegadores principales admiten el método forward()
Ejemplo
Ejemplo
Crea un botón de avance en la página:
<!DOCTYPE html>
<html>
<head>
<script>
function goForward(){
window.history.forward()
}
</script>
</head>
<body>
<input type="button" value="Adelante" onclick="goForward()">
</body>
</html>
<html>
<head>
<script>
function goForward(){
window.history.forward()
}
</script>
</head>
<body>
<input type="button" value="Adelante" onclick="goForward()">
</body>
</html>
El resultado del ejemplo anterior:
Pruébalo »
Objeto History Otras extensiones