How To Disable Back function in browser?
Disable Back function in browser
Sometimes we need to disable back function of our web page.
So, I am giving the code To disable back function. just write below javascript code in your head tag.Code :
<script type = "text/javascript" >
function disableBackButton()
{
window.history.forward();
}
setTimeout("disableBackButton()", 0);
</script>
Then put the below in body tag.Code:
<body onload="disableBackButton()">
Thank You.
Reference: http://blog.dotnetsquare.com/java-script/disable-function-browser/