Created
December 6, 2022 06:26
-
-
Save arif98741/e1f79430b24eba74111a12dfffd665ad to your computer and use it in GitHub Desktop.
No Back
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Disable Back Button in Browser - Online Demo</title> | |
<style type="text/css"> | |
body, input { | |
font-family: Calibri, Arial; | |
} | |
</style> | |
<script type="text/javascript"> | |
window.history.forward(); | |
function noBack() { | |
window.history.forward(); | |
} | |
</script> | |
</head> | |
<body onload="noBack();" onpageshow="if (event.persisted) noBack();" onunload=""> | |
<H2>Demo</H2> | |
<p>This page contains the code to avoid Back button.</p> | |
<p>Click here to Goto <a href="noback.html">NoBack Page</a></p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment