跳到主要内容

防止强制跳转

window.onbeforeunload = () => false;
Object.defineProperty(window, "onbeforeunload", { get: () => null, set() {} });