簡體   English   中英

當您無權訪問父文檔時,是否可以從子文檔更改 iFrame 的高度?

[英]Is it possible to change height of iFrame from child document when you have don't have access to the parent document?

我正在嘗試將子文檔添加到父文檔中的 iFrame 中。 我無權訪問父頁面,它始終顯示 iframe 高度 0。是否可以從子文檔更改此高度?

<html>
    <body>
        <span>This is parent document that I don't have access to.</span>
        <iframe src="src_to_my_page" style="border: none; height: 0px;">
            // document that I have access to.
        </iframe>
    </body>
</html>

無論文檔是什么,此 iframe 的高度始終為 0,並且由於我無法訪問父文檔,有沒有辦法更改它?

只能從父頁面更改 iFrame 的高度。 如果您沒有訪問權限,那么您很不走運,我們需要與父站點的開發人員交談

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM