Iframe 자체 적응 고도 절대 호 환 IE,여행,불 여우

 
<script type="text/javascript">
function reinitIframe(){
var iframe = document.getElementById("mainFrame");
try{
var bHeight = iframe.contentWindow.document.body.scrollHeight;
var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
var height = Math.max(bHeight, dHeight);
iframe.height = height;
}catch (ex){}
}
window.setInterval("reinitIframe()", 200);
</script>

좋은 웹페이지 즐겨찾기