<html>
<body>
<button onclick="goBack()">Go 2 pages back</button>
<p>Notice that clicking on the "Go 2 pages back" button here will not result in any action, because there is no previous URL in the history list.</p>
<script>
function goBack() {
window.history.go(-2);
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_his_go by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 14:05:37 GMT -->
</html>