我正在研究用于属性搜索的 idx 插件。它是一个提供给搜索属性的 http 链接,但我想将此链接转换为 https 用于我使用的那个目的<iframe>
,并且我将https:
链接放在 iframe 上它工作正常。
但是 iframe 内容会出现问题,它的内容有一个可以使用的表单,http
所以我也会转换它https
,所以已经用于jquery
更改 iframe 的内容,但它会给我一个错误
Uncaught DOMException: Blocked a frame with origin "http://localhost" from accessing a cross-origin frame.
框架代码
<iframe src="https://www.idxhome.com/homesearch/xxxxx" width="100%" height="1750" frameborder="0" allowtransparency="true" id="foo" sandbox="allow-same-origin allow-scripts">
jQuery代码
var iframe = document.getElementById("foo");
var elmnt = iframe.contentWindow.document.getElementsByTagName("body");
elmnt.style.display = "none";
带有动作的 iframe 表单内容http
我想更改它https
<form id="ihf-contact-request-form" class="form-inline" data-ihf-event="contact-form-submit" action="http://www.idxhome.com/contact/submit/ajax/126024" method="POST" data-ihf-event-bound="true"> /form>
我将如何做到这一点我已尝试搜索与此相关的所有内容,但它对我不起作用。