2016-03-09 300 views
0

我在Windows 10 Build 10586.122中,並且新Edge瀏覽器中的window.open方法不符合規範。Microsoft Edge window.open()不遵守第二個彈出窗口的寬度高度

如果使用https://msdn.microsoft.com/en-us/library/ms536651(v=vs.85).aspx中的示例代碼,並單擊以打開一個新窗口,它將打開一個具有正確寬度和高度的新窗口。但如果從第一個彈出窗口打開第二個新窗口,這將完全忽略寬度和高度,但與第一個彈出窗口大小相同。

例如:我有2個文件吹

文件1:sample1.html

<!DOCTYPE html> 
<html> 
    <body onclick="myOpen();"> 
     <p>Click this page and window.open() is called.</p> 
     <script> 
      function myOpen() { 
       window.open("Sample2.html", null, "height=200, width=400, status=yes, toolbar=no, menubar=no, location=no"); 
      } 
     </script> 
    </body> 
</html> 

文件2:sample2.html

<!DOCTYPE html> 
<html> 
    <body onclick="myOpen();"> 
     <p>Click this page and window.open() is called.</p> 
     <script> 
      function myOpen() { 
       window.open("Sample1.html", null, "height=400, width=800, status=yes, toolbar=no, menubar=no, location=no"); 
      } 
     </script> 
    </body> 
</html> 
+0

你爲什麼把你的windows命名爲'null'? – Teemu

+0

如果我在第二個參數中添加名稱,它仍然是一樣的,沒有任何改變。 –

回答

0

我觀察到第二個子窗口在Microsoft Edge瀏覽器中沒有使用strWindowOptions。但是,使用其他瀏覽器時,它可以工作。我花了很多時間在這方面,我希望得到一些幫助。

相關問題