History.forward()

JavaScript 1.0+, ECMAScript 1.0+, JScript 1.0+ Nav2+, IE 3+, Opera3+ Syntax

history.forward()

Description

The forward() method of the History object is used to load the URL for the next Web site in the history list.

Example

Listing 7.296 shows an example of how the forward() method is used to simulate the forward functionality of the browser.

Listing 7.296 Example of the forward() Method
<html>
<head>
<title> Using the forward method of the History object</title>
</head>
<body>

<form name=form1>
Click on the button to go to the forward browser page.
<input type="button" value="Go Forward" onClick='window.history.forward()'>
</form>

</body>
</html>
							
							
						

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.