0
我有一个奇怪的问题。在一些浏览器(如chrome)下面的代码打开一个新窗口。所以它按预期工作。在其他浏览器(如Firefox)它只显示警告框所以它不会打开请求的窗口。 任何适用于所有浏览器的代码的建议?javascript:window.location在所有浏览器上都无法打开新窗口
if(TestVar == "1810")
{
alert ("test " + TestVar + "! ");
window.location.href="http://astyle.home.xs4all.nl/beautyfarm2003/wellnessbon_321442.html";
}
if(TestVar == "1920")
{
alert ("Test " + TestVar + "! ");
window.location="http://astyle.home.xs4all.nl/beautyfarm2003/wellnessbon_1925485.html";
} // Vriendinnendag
打开一个新窗口,又名,你的意思是它并不导航到新的页面?你听起来像你使用window.open(),但你不是。 – epascarello