gpt4 book ai didi

javascript - 使背景变为空白并重定向 IE 8 及更早版本

转载 作者:行者123 更新时间:2023-11-28 11:18:00 26 4
gpt4 key购买 nike

在网站中,对IE的支持是从9版本开始的。所以当我打开它时,它表现正常(因为我有 IE 8),显示警报。包括图片

enter image description here

但是我不希望加载背景图像(在我的情况下正在加载)。只有一个显示警报信息的空白屏幕。如何实现?

这是我用过的脚本

 if(browsername=="Internet Explorer")
{
if(browserver<9.0)
{
alert("Your browser version is "+bowser.version+" and the minimum required version for this website is 9.0.So please use IE 9+.");
window.location.href="http://www.google.com";
//alert(bowser.name+","+bowser.version);
}
}

最佳答案

假设你的背景是 body 背景然后放:

$("body").css("background","");

在 alert() 代码之前。

关于javascript - 使背景变为空白并重定向 IE 8 及更早版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21671767/

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