且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用jQuery阻止页面卸载?

更新时间:2023-12-02 10:52:16

window.onbeforeunload = function() {
    return 'You have unsaved changes!';
}

很多关于***的问题
如何覆盖OnBeforeUnload对话框并将其替换为myBeforeUnload拥有?

many question about this in *** How can I override the OnBeforeUnload dialog and replace it with my own?

JavaScript + onbeforeunload