Edit This Code:
<!DOCTYPE html>
<html>
<head>
<script>
function goForward() {
    window.history.forward()
}
</script>
</head>
<body>

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

<p>Clicking on the Forward button here will not result in any action, because there is no next URL in the history list.</p>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy