7

我使用的是 Windows 10 预览版 Build 10130,window.open新 Edge 浏览器中的方法未按照规范运行。

如果您使用https://msdn.microsoft.com/en-us/library/ms536651(v=vs.85).aspx中的示例代码,并单击打开一个新窗口,它将在背景,并且将完全忽略宽度和高度。

<!DOCTYPE html>
    <html>
    <head>
      <title>window.open()</title>
      <style>
        html, body {
            width: 100%;
            height: 100%;
            border: 1px solid black;
        }
        </style>
    </head>
    <body onclick="myOpen();">
      <p>Click this page and window.open() is called.</p>
      <script>
        function myOpen() {
          window.open("Sample.htm", null, "height=200, width=400, status=yes, toolbar=no, menubar=no, location=no");
        }
      </script>
    </body>
    </html>

其他人看到这个问题吗?http://jsfiddle.net/TylerH/c91hcoum/2/

4

3 回答 3

3

这现在在 windows build 10162 中得到解决

于 2015-07-07T21:28:51.483 回答
1

您分享的 URL 中的 open 方法文档和示例代码是针对 IE 的,尚未针对 Edge 进行更新。正如我在阅读该页面时注意到的那样。当我们处于内部预览模式时,Edge 仍在完善和完善。在 Build 10162 上,我在这个 JSFiddle http://jsfiddle.net/RamiSarieddine/wu09fh1d/上工作

window.open("http://dev.modern.ie/community/","_blank","height=500,width=500,scrollbars=yes,location=yes");

您可以看到高度为 500、宽度为 300 的窗口打开,带有滚动条、最小化和关闭按钮。检查下面的屏幕截图。

在此处输入图像描述

window.open("http://dev.modern.ie/community/","_blank","height=500,width=500,scrollbars=yes,location=yes");

于 2015-06-14T12:49:43.023 回答
-1

如果高度高于屏幕(包括浏览器绒毛),则窗口将被最大化。这与使用 IE 9、10、11 的行为不同。

这是使用 RTM Win10 Edge。

于 2015-07-29T17:29:27.357 回答