disabling back button using javascript

By default browsers does not allow us to disable back button. However, when working with database applications, we often need to disable the back button. In this example, we disable the back button using javascript:

<h1>This is page 1</h1>
<input id="btnback" name="btnback" type="button" value="Back" onclick="window.history.back();" />


Add a Comment

Your email address will not be published. Required fields are marked *