無法在wordpress頁面中載入iframe
問題描述:
I have been trying to load an section of page using iframe
in my wordpress
site. I can load certain sites in the iframe
without any issue but while i try my required page it doesn\'t work as expected just inside the page. The iframe
src is loading perfectly if its opened individually
I have tried most of the answers mentioned here in stackoverflow
and other forums, still can\'t get a solution for this. I tried adding code in .htaccess
, also tried adding code in functions.php
This is the iframe
src I want to load.
It can be loaded individually in browser but not inside an iframe
. I am getting the following error in console while i try to load it :
[ERROR] Permission denied to access property \"hash\" on cross-origin object
Is this an issue with my code, server config or with the URL itself?
Thanks
圖片轉代碼服務由CSDN問答提供
感謝您的意見,我們儘快改進~
功能建議
我一直在嘗試使用中的
iframe </ code>載入一部分頁面 wordpress </ code>網站。 我可以在
iframe </ code>中載入某些網站而不會出現任何問題,但是當我嘗試我所需的頁面時,它在頁面內部無法正常工作。
iframe </ code> src如果單獨打開則完全載入</ p>
我已經嘗試了 stackoverflow </ code>和其他論壇中提到的大部分答案, 仍然無法得到解決方案。 我嘗試在
.htaccess </ code>中添加代碼,也嘗試在
functions.php中添加代碼</ code> </ p>
這是我要載入的 iframe </ code> src
。 </ p>
它可以在瀏覽器中單獨載入,但不能在 iframe </ code>中載入。 我在嘗試載入它時在控制台中收到以下錯誤:</ p>
[錯誤]在跨源對象上訪問屬性「hash」的許可權被拒絕</ p>
這是我的代碼,伺服器配置還是URL本身的問題?</ p>
謝謝</ p>
</ div>
網友觀點:
It\'s about your source is blocking unauthorization call from domains not in CORS. They\'re only allow call from Origin https://ec.europa.eu. The short answer, you can\'t deal anything from your side.
More information about CORS: https://developer.mozilla.org/en/docs/Web/HTTP/Access_control_CORS
1. 帶 [親測] 說明源碼已經被站長親測過!
2. 下載後的源碼請在24小時內刪除,僅供學慣用途!
3. 分享目的僅供大家學習和交流,請不要用於商業用途!
4. 本站資源售價只是贊助,收取費用僅維持本站的日常運營所需!
5. 本站所有資源來源於站長上傳和網路,如有侵權請郵件聯繫站長!
6. 沒帶 [親測] 代表站長時間緊促,站長會保持每天更新 [親測] 源碼 !
7. 盜版ripro用戶購買ripro美化無擔保,若設置不成功/不生效我們不支持退款!
8. 本站提供的源碼、模板、插件等等其他資源,都不包含技術服務請大家諒解!
9. 如果你也有好源碼或者教程,可以到審核區發布,分享有金幣獎勵和額外收入!
10.如果您購買了某個產品,而我們還沒來得及更新,請聯繫站長或留言催更,謝謝理解 !
GG資源網 » 無法在wordpress頁面中載入iframe