【问题标题】:Microsoft Edge "Permission Denied" Issue When Setting "document.domain" in Dynamically Created IFrame在动态创建的 IFrame 中设置“document.domain”时,Microsoft Edge“权限被拒绝”问题
【发布时间】:2015-10-26 04:35:52
【问题描述】:

知道为什么下面的脚本会在 Windows 10 Microsoft Edge 浏览器中返回“SCRIPT70: Permission denied”吗?

var f= document.createElement("iframe");
f.src = "javascript:void((function(){document.open();document.domain=document.domain;document.close();})())";
document.body.appendChild(f);

请注意,此脚本可在其他浏览器中运行。

【问题讨论】:

    标签: iframe permission-denied microsoft-edge


    【解决方案1】:

    不确定,但可能是因为 Edge 不支持 javascript: URI

    【讨论】:

      猜你喜欢
      • 2012-05-12
      • 1970-01-01
      • 1970-01-01
      • 2014-06-20
      • 1970-01-01
      • 1970-01-01
      • 2015-11-18
      • 2013-02-09
      • 2013-08-07
      相关资源
      最近更新 更多