+ 4
What is that event that triggers when a web-page looses focus or gets close?
For example when you are on a banking site, and by mistake you click on the close button, it confirms that all the changes will be lost upon closing the page. So what's that event that triggers here? JavaScript course has talked about confirm here but not that event
3 odpowiedzi
+ 4
Try this (link the jQuery firts) :
$(document).ready(function() {
$(window).bind('beforeunload', function () {
return 'Are you sure want to leave this page?';
});
});
+ 2
try "onbeforeunload"
+ 2
is that onblur?