javascript - How to know return of window.onbeforeunload -
I have the JS function window .onbeforeunload that gives a msg and browser show that in the confirmation box. How do I know now whether the user has left that page or is on the page?
Javascript window .onbeforeunload = function (e) Click on "return" page then save to save any data. Ve entered \ n if you already have it Then choose Leave page to continue. "; }
update Anyway, if the variables were stopped, then what you want is what you get; If they leave, then it will not make any difference.
window.onbeforeunload = function (e) {var myVariable = 'updated value'; // Definitely, do not come back to this scope "click to stay on the page and save to save any data you have entered. \ N If you have already saved, leave it to continue Select the page. "; }
What happens to x
when you try to leave:
Comments
Post a Comment