0
iframe의 상위 창에 액세스하여 iframe의 높이를 설정하려고합니다.Mac Google Chrome iframe 액세스 상위 창
다음 코드는 Windows IE7/IE8/Chrome/FireFox 3.6 및 Mac FireFox/Safari에서 작동합니다.
그러나 에서 Mac Chrome 부모 창에 액세스하는 것으로 보이지 않습니다. iframe.html에서
<iframe src="iframe_saleinfo.html" id="saleInformationIframe" frameborder="0"></iframe>
:
$(document).ready(function() {
var theFrame = $('#saleInformationIframe', window.top.document);
theFrame.height($(document.body).height() + 30);
});
나는 또한 시도 : 부모 페이지에서
나는 iframe을 가지고$(document).ready(function() {
var theFrame = $('#saleInformationIframe', top.document);
theFrame.height($(document.body).height() + 30);
});
을 그리고 난 시도했다 :
$(document).ready(function() {
var theFrame = $('#saleInformationIframe', parent.document.body);
theFrame.height($(document.body).height() + 30);
});
그리고 나는 시도 : 사전에
$(document).ready(function() {
var theFrame = $('#saleInformationIframe', window.parent.document);
theFrame.height($(document.body).height() + 30);
});
감사합니다,
메이트 Jayde.