编程逆向防止强制跳转防止强制跳转window.onbeforeunload = () => false;Object.defineProperty(window, "onbeforeunload", { get: () => null, set() {} });