3
iframeのコンテンツがマスターページのasp.netサイトである場合、iFrameコンテンツの高さを設定するにはどうすればよいですか?すべてのブラウザのiFrameコンテンツの高さを設定するにはどうすればよいですか?
誰でもjQueryプラグインを知っていますか?ボディのonload()
ボディのonload = "のresizeFrameでそれを呼び出す
更新 これはIEで正常に動作しますが、クロムに失敗し、Firefoxの
function resizeFrame(f) { f.style.height = f.contentWindow.document.body.scrollHeight + "px"; }
(document.getElementById( 'MainIFrame')) "
のiframeコード
<iframe id="MainIFrame" class="autoHeight" runat="server" marginwidth="0" style="margin: auto; "
frameborder="0" width="100%" scrolling="no" >
</iframe>
詳細情報は 'いいだろうためにスクリプトの動作:)' –
は、いくつかのコードを使用して更新...私は同じ高さを持っている私のiframeが好きページ内 – Zeus
を参照してください:http://stackoverflow.com/questions/247128/how-to-auto-size-an-iframeに加えて、その件に関する他の回答。 –