Latest web development tutorials

History forward () method

History Object Reference History Object

Definition and Usage

forward () method can be loaded in the history list to the next URL.

This method is called the effect is equivalent to clicking the forward button or call history.go (1).

grammar

history.forward()


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support forward () method


Examples

Examples

Create a forward button on the page:

<! DOCTYPE html>
<Html>
<Head>
<Script>
function goForward () {
window.history.forward ()
}
</ Script>
</ Head>
<Body>

<Input type = "button" value = "Forward" onclick = "goForward ()">

</ Body>
</ Html>

Examples of the above output:


try it"


History Object Reference History Object