Get Major Training|Project Training|Live Project|Industrial Training On Android| I-Phone | Java | J2SE | J2EE | C#.Net | ASP.Net| PHP | PHP with Wordpress | Joomla | Majento Contact us

Thursday

How to Disable Browser Back Button website javascript

Hi

Many times we are comes to a situation for which we have to disable our browser default back button and don't allow user to go back

like in a online examination website we cant go backward

we are sharing a simple javascript for disabling Browser Back Button

 Just use a simple javascript that will force the webpage to go forward once the back button is being triggered.

<body onUnload="noBack()">
<script>
function noBack()
{
window.history.forward(1);
}
</script>

These code is compatible to all of the modern browser  
Author: Vikas Agrawal
Vikas Agrawal is a CEO and Founder Of Vinayak Informatics Systems. Read More →

You Like It, Please Share This Article Using...



No comments:

Post a Comment

Please leave your comments and we will be reply you back ASAP
vikas agrawal