Does anyone know how to block browser back button? [duplicate]
Possible Duplicate:
Disable browser's back button
i have one button on page开发者_如何学Go on that button click event page will redirect on the next page now i click on the browser back button but i want to restrict browser back button for some security purpose
does any one know how to block browser back button so that page can not redirect to previous page?
Do not disable expected browser behaviour and you can handle the possiblity at your end, but if you really want to do so, there is one work around here...
Just put this javascript on the html section of aspx page above head section.
This causes every back to return with a forward.
<script type = "text/javascript" >
function disableBackButton()
{
window.history.forward();
}
setTimeout("disableBackButton()", 0);
</script>
Open the webpage in a popup window rather than normal window. So, that you can restrict the popup window from displaying buttons, menus, status and other features.
精彩评论