History forward() Method - Javascript Browser Object Model

Javascript examples for Browser Object Model:History

Description

The forward() method loads the next URL in the history.

Parameters

None

Return Value:

No return value

The following code shows how to go forward one page.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<button onclick="goForward()">Go Forward</button>

<script>
function goForward() {// w  ww . j a va2  s  . com
    window.history.forward();
}
</script>

</body>
</html>

Related Tutorials