我已经尝试过这里提到的各种方法来让 iframe 改变高度。它适用于原始 src 域的初始加载,但是当在 iframe 内单击指向子域 s 的链接时,我收到以下错误:
Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.profiledata.co.za') does not match the recipient window's origin ('https://funds.profiledata.co.za').
URL:https ://www.iol.co.za/business-report/market-indicators 点击 Funds 获取子域。
我已经尝试将 checkOrigin 设置为 false 以及其中包含两个域的数组,但我仍然遇到相同的错误。它不会调整子域页面上的 iframe 的大小。任何想法,谢谢。