Created
January 21, 2014 08:25
-
-
Save SteAllan/8536244 to your computer and use it in GitHub Desktop.
A JS function to alert the user when they're about to leave the page (http://css-tricks.com/use-target_blank/?utm_source=dlvr.it&utm_medium=twitter)
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
window.onbeforeunload = function() { | |
return "Two buttons will be below this message asking if user wants to stay on this page or leave."; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment