gpt4 book ai didi

css - 如何自定义(更改颜色、字体、图像等设计)Google Chrome 自定义导航

转载 作者:行者123 更新时间:2023-11-28 06:35:14 25 4
gpt4 key购买 nike

您好,当用户像这样关闭我的网站时,我正在显示确认导航

enter image description here

我使用下面的代码在我的网站中显示自定义导航

            $(document).ready(function () {
var popit = true;
window.onbeforeunload = function () {
if (popit == true) {
popit = false;
return "Are you sure you want to leave?";
}
}
});

谁能建议我如何自定义确认导航。

最佳答案

不,不可能设置这些样式,因为它们是浏览器生成的 UI。如果您希望能够设置确认框或警报的样式,则需要使用 <dialog>元素或其他一些方法 - 请注意,您将无法像使用和 alert 那样阻止浏览器卸载。或 confirm

关于css - 如何自定义(更改颜色、字体、图像等设计)Google Chrome 自定义导航,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34737895/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com