Forum Moderators: open
window.onbeforeunload = function () {
return 'You might lose your data!';
};
(e). Why is that, what is the difference, and which is right? Are you sure you want to leave this page?
return '';
the function has an extra parameter: (e). Why is that, what is the difference, and which is right?
Can I content myself to this message and leave the return value empty: