iframe 높이 자동조절 스크립트 정보
JavaScript iframe 높이 자동조절 스크립트본문
            
            
                        <script language='javascript'>
<!--
function changeHeight() {
//아이프레임 안쪽 페이지 높이를 먼저구하신후
var the_height=document.getElementById('content').contentWindow.document.body.scrollHeight;
// 아이프레임 높이를 바꿔주시면 됩니다.
document.getElementById('content').height=the_height; }
//-->
</script>
<iframe id='content'
frameborder=0
width=100%
scrolling=no
onLoad="changeHeight();"
src='content.php'>
</iframe>
                
                
                <!--
function changeHeight() {
//아이프레임 안쪽 페이지 높이를 먼저구하신후
var the_height=document.getElementById('content').contentWindow.document.body.scrollHeight;
// 아이프레임 높이를 바꿔주시면 됩니다.
document.getElementById('content').height=the_height; }
//-->
</script>
<iframe id='content'
frameborder=0
width=100%
scrolling=no
onLoad="changeHeight();"
src='content.php'>
</iframe>
                        
                추천
                
0
                
    0
댓글 7개
                
                    감사요~                
                
                
            
                    
                
                    꼭 필요한데 꿀같으 소스네요                
                
                
            
                    
                
                    꼭 해봐야지..^^                
                
                
            
                    
                
                    크로스 브라우징때문입니다.
자신의 사용되고있는 서비스에 페이지가 존재해야합니다.
                    자신의 사용되고있는 서비스에 페이지가 존재해야합니다.

                
                    원래 화면에 꽉 차게 나와야 하는 거 아닌가요?
index.php 파일에 넣어봐도 위 링크와 동일한 높이로 보이던데요.
                    index.php 파일에 넣어봐도 위 링크와 동일한 높이로 보이던데요.

                
                    https://sir.kr/qa/103033 <--여기 자동조절 할 수 있습니다.