Use history back button : History « Window Browser « JavaScript DHTML






Use history back button

<HTML>
<HEAD>
<TITLE>onBeforeUnload Event Handler</TITLE>

<SCRIPT LANGUAGE="JavaScript">
function verifyClose() {
    event.returnValue = "We really like you and hope you will stay longer.";
}
window.onbeforeunload = verifyClose;
</SCRIPT>
</HEAD>
<BODY>
<H1>onBeforeUnload Event Handler</H1>
<HR>
<P>Use this button to navigate to the previous page:
<BUTTON ID="go" onClick="history.back()">
Go Back
</BUTTON>
</BODY>
</HTML>

           
       








Related examples in the same category

1.History 'back()' Example
2.History 'forward()' Example
3.A Browser History Count
4.Go Back to previous Page
5.Go Back to some step
6.Go Back to previous Page using number
7.Methods and Properties of the History Object