Created
October 16, 2013 00:59
-
-
Save twinge/7001048 to your computer and use it in GitHub Desktop.
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 (e) { | |
var message = "Your change has not been submitted, if you exit the page without submitting your change will not be received.", | |
e = e || window.event; | |
// For IE and Firefox | |
if (e) { | |
e.returnValue = message; | |
} | |
// For Safari | |
return message; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment