3
iframe的內容是否爲具有母版頁的asp.net網站時,如何設置iFrame內容的高度?如何爲所有瀏覽器設置iFrame內容的高度?
有誰知道任何jQuery插件?
更新 能正常工作,在IE瀏覽器,但在Chrome失敗和firefox
function resizeFrame(f) { f.style.height = f.contentWindow.document.body.scrollHeight + "px"; }
調用它身體的onload()
身體的onload =「resizeFrame (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加上關於這個問題的其他答案。 –