Disable browser back button using javascript

June 8, 2008 – 11:03 am

Some times after filling the form, user oftenly clicks on back button to go back. We can disable this back button using javascript in the following way

<script language=”JavaScript”>
<!–
history.go(+1);

// –>
</script>
<script>
javascript:window.history.forward(1);
</script>

This script sends the user to the same page where he/she is clicking the back button. In another way its just disables the back button

Share/Save/Bookmark

Post a Comment