📌  相关文章
📜  确认关闭选项卡 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:56.577000             🧑  作者: Mango

代码示例1
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?';
};