iframe이 로딩될 때 현재 프레임의 스크롤바값을 가져와서 창크기 자동 조절 스크립트입니다.


[샘플 코드]
<script language="javascript">
    function ResizeIframe(frm)
    {
        frm.setExpression('width', ifrmTest.document.body.scrollWidth);
        frm.setExpression('height', ifrmTest.document.body.scrollHeight);
    }
</script>


<body>
    <iframe id="ifrmTest" src="Test.aspx" name="test" marginwidth="0"marginheight="0" topmargin="0" scrolling="no"
             frameborder="0" ALLOWTRANSPARENCY="true" onload="javscript:ResizeIframe(this);">
    </iframe>
</body>

+ Recent posts