0
我使用iframe在我的應用程序中嵌入一個站點並使用iframe resizer庫。獲取iframe中內容的高度使用iframe resizer
<iframe id="iframeContainer" class="iframeContainer" src="mysite.com" width="100%" scrolling="no" ></iframe>
和代碼腳本
iFrameResize({
log:true,
autoResize: true,
resizeFrom: 'child',
sizeWidth:false,
checkOrigin:false,
minWidth: 1200,,
heightCalculationMethod: "max"
});
我希望得到負荷父頁面後height
內容的mysite.com
,但我已經想到了一個辦法。
當它跨域時,您無法訪問iframe內部 – charlietfl