由于DOM错误,无法访问在iframe中的js中使用html的页面

由于DOM错误,无法访问在iframe中的js中使用html的页面,iframe,Iframe,在这里我有一个网站www.mytest.com,它非常简单,只有一个带有iframe的空白页面 <div id="container"> Hello World!!! </div> <div> <iframe style="border: none;height: 100%;width:100%;position: fixed;top: 50px; background:white" src="http://anothersite.com"><

在这里我有一个网站www.mytest.com,它非常简单,只有一个带有iframe的空白页面

<div id="container">
Hello World!!!
</div>
<div>
<iframe style="border: none;height: 100%;width:100%;position: fixed;top: 50px; background:white" src="http://anothersite.com"></iframe>
</div>
这两个结果都是“www.mytest.com”。但它仍然无法访问具有相同错误的特殊页面


有人知道如何解决这个问题或解决这个问题的方法吗?

我也在另一个网站上试过set,但仍然没有帮助。另一件事是mytest.com和othersite.com没有任何交互。所有请求均由othersite.com自己发出。
var test = '<div class="mystyle"><span>mythings</span></div> ......';
console.log("iframeData",document.querySelector('iframe').contentDocument.domain);
console.log("hostName", window.location.hostname);