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