前提条件:你应该在狩猎10.
您好,我在请假时遇到困难 |保持确认框在不同浏览器中显示在我的页面上。
请前往https://www.biznessapps.com/cms https://www.biznessapps.com/cms,并使用以下凭据登录:
username: [email protected] /cdn-cgi/l/email-protection
password: skl@0!_~!(
登录后,转到 /welcome 页面。请单击左侧边栏中的“设置”并转到“会员资格”选项卡。
If you can see "Enable Membership Features", then click it and change anything there and navigate to another page. You will see the confirmation box show up the first time you try to leave the page.
单击“离开”转到您的目标页面,然后返回此设置页面并尝试相同的操作;您将不会再看到确认框(使用 Safari 时)。
我在以下位置使用了这个代码片段:https://www.biznessapps.com/cms/v2/public/scripts/pages/settings.js?v=68.160720 https://www.biznessapps.com/cms/v2/public/scripts/pages/settings.js?v=68.160720
/* settingsPages.isChanged() is my custom function */
window.addEventListener("beforeunload", function(event) {
if (settingsPage.isChanged()) {
event.returnValue = "some string";
return "some string";
}
});
它在 Google Chrome 和 Firefox 上运行良好,但在 Safari 上运行不佳。
Thanks!