Home  »  Code Snippets  »  Java Script  »

How To Disable Back function in browser?

 Posted By : Manoranjan SahooPosted Date : 02/12/2010 11:27:45 AM Category : Java Script Points : 3 (Rs 1.00)

To disable back function. just write below javascript code.

<script type = "text/javascript" >
function disableBackButton()
{
window.history.forward();
}
setTimeout("disableBackButton()", 0);
</script>

Then put the below in body tag.

<body onload="disableBackButton()">

Responses
No responses found for this thread. Be the first to respond this thread.
Post Reply
Login to post Response.