在网站中,对IE的支持是从9版本开始的。所以当我打开它时,它表现正常(因为我有 IE 8),显示警报。包括图片
但是我不希望加载背景图像(在我的情况下正在加载)。 只有一个显示警报信息的空白屏幕。如何实现?
这是我用过的脚本
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/