1 window.onbeforeunload = function (e) { 2 e = e || window.event; 3 // For IE and Firefox prior to version 4 4 if (e) { 5 e.returnValue = '确定退出吗?'; 6 } 7 8 // For Safari 9 return '确定退出吗?'; 10 }
posted on 2014-03-06 22:09 木龙哥 阅读(160) 评论(0) 编辑 收藏 举报