Created
September 14, 2019 23:05
-
-
Save Alexisgt01/9bc967f8311851dc0203ea618cede84c to your computer and use it in GitHub Desktop.
Prevent window close
This file contains 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
window.onbeforeunload = confirmExit; | |
function confirmExit() { | |
return "You have attempted to leave this page. Are you sure?"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment