📅  最后修改于: 2022-03-11 15:03:56.577000             🧑  作者: Mango
window.onbeforeunload = function (e) {
e = e || window.event;
// For IE and Firefox prior to version 4
if (e) {
e.returnValue = 'Sure?';
}
// For Safari
return 'Sure?';
};