Wednesday 25 September 2013

how to Disable Back button using JavaScript

                          Disable Back button using JavaScript 
 
sometimes, you may want to disable the browser back button on your webpage for personal reasons, Below code snippet will let you do this. The most important thing here is that you need to put this code in page where you don't want user to come back. code as showed below.

Reference: Disable Browsers Back Button
<SCRIPT type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</SCRIPT>
</HEAD>
<BODY onload="noBack();"
onpageshow="if (event.persisted) noBack();" onunload="">

by #ADMINBIIGZEE

No comments:

Post a Comment