Last active
August 3, 2023 23:29
-
-
Save goodreds/d045b54be8fa68746be0981e47ff59bd to your computer and use it in GitHub Desktop.
Warn user before leaving current page
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
<script>window.onbeforeunload = function () { | |
return "Two buttons will be below this message asking if the user wants to stay on this page or leave."; | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment