Posted by: mrkandy on: Ноябрь 29, 2009
$(function(){ $(window).bind(‘beforeunload’, function(event) { event.preventDefault(); event.originalEvent.returnValue = ‘Are you sure?’; }); // WebKit has bug https://bugs.webkit.org/show_bug.cgi?id=20135 window.onbeforeunload = function(){ return ‘Are you sure?’; } // Opera do not support onbeforeunload !!! });