iframe (外部サイトをロードする) の高さを動的に調整する方法はありますか?
また
iframe にスクロールバーが存在するかどうかを確認する方法はありますか?
iframe (外部サイトをロードする) の高さを動的に調整する方法はありますか?
また
iframe にスクロールバーが存在するかどうかを確認する方法はありますか?
これを試して:
// Get the iFrame jQuery Object
var $MyFrame = $("#iframeid");
// You need to wait for the iFrame content to load first
// So, that the click events work properly
$MyFrame.load(function () {
var frameBody = $MyFrame.contents().find('body');
// Set the iFrame height
$MyFrame.css({
height: frameBody.outerHeight()
});
});