I need to disable the browser back button while cliking the submit button in html page to secure the process has not terminated.
Here is the code to disable the back button in browser, but it's working in onload event only. when i am trying to use this in onclick event it wont work.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>New event</title>
</head>
<SCRIPT type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</SCRIPT>
</HEAD>
<BODY onload="noBack();"
onpageshow="if (event.persisted) noBack();" onunload="">
<a href='page2.html' >Page 2</a>
</body>
</html>
Can anyone know how to disable the browser back button while i am clicking submit button in html page
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…