![](/img/trans.png)
[英]Microsoft Edge window.open() not honoring width height, and opens in background
[英]Microsoft Edge window.open() not honoring width height on the second popup
我在Windows 10內部版本10586.122上,並且新Edge瀏覽器中的window.open方法未按照規范運行。
如果您使用https://msdn.microsoft.com/zh-cn/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>
這似乎是MS Edge中的一個開放錯誤。 該錯誤已在此處提交: https : //connect.microsoft.com/IE/Feedback/Details/2434857希望這可以幫助您節省一些時間調查問題。 最好,馬爾特
我觀察到第二個子窗口未在Microsoft Edge瀏覽器中使用strWindowOptions
。 但是,當使用其他瀏覽器時,它可以工作。 我在此上花了很多時間,希望能有所幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.