Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.onbeforeunload = function () {
- return 'message'
- };
- var tempDisableBeforeUnload = function() {
- var obu = window.onbeforeunload;
- if (obu) {
- window.onbeforeunload = null;
- setTimeout(function() {
- window.onbeforeunload = obu;
- }, 0);
- }
- }
- $("form.noWarnOnSubmit").submit(tempDisableBeforeUnload);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement