gpt4 book ai didi

javascript - 未捕获的 DOMException : Failed to read the 'contentDocument'

转载 作者:行者123 更新时间:2023-11-30 15:30:32 25 4
gpt4 key购买 nike

自从我安装了 SSL 证书后,我在针对来自 iframe 的一些信息运行 js 时遇到了问题。

我不断得到:

Uncaught DOMException: Failed to read the 'contentDocument' property from 'HTMLIFrameElement': Blocked a frame with origin "https://www. *** .ro" from accessing a cross-origin frame.

在搜索互联网时,我发现这是一个安全问题,不允许您从另一个域或子域加载文件,但事实是,我不是从子域或其他域加载文件。我直接从同一个域/iframe.php 加载。

这发生在添加 SSL 证书之后,在此之前,完全相同的脚本可以正常运行。

最佳答案

尝试使用 object 和 embed 来模拟 iframe 也许这可行

<object data="https://...." width="600" height="400">
<embed src="https://...." width="600" height="400"> </embed>
</object>

关于javascript - 未捕获的 DOMException : Failed to read the 'contentDocument' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42317920/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com