자동크기 조절 아이프레임 정보
자동크기 조절 아이프레임본문
출처 : http://www.sinbd.com/bbs/tb.php/info/715
<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('the_iframe').contentWindow.
document.body.scrollHeight;
//change the height of the iframe
document.getElementById('the_iframe').height=
the_height;
}
//-->
</script>
위 스크립트를 넣어주시고
<iframe width=100% id="the_iframe" onLoad="calcHeight();" src="불러올 내용주소" scrolling="NO" frameborder="0" height="0"></iframe>
이런식으로 불러오면 됩니다.
<script language="JavaScript">
<!--
function calcHeight()
{
//find the height of the internal page
var the_height=
document.getElementById('the_iframe').contentWindow.
document.body.scrollHeight;
//change the height of the iframe
document.getElementById('the_iframe').height=
the_height;
}
//-->
</script>
위 스크립트를 넣어주시고
<iframe width=100% id="the_iframe" onLoad="calcHeight();" src="불러올 내용주소" scrolling="NO" frameborder="0" height="0"></iframe>
이런식으로 불러오면 됩니다.
추천
2
2
댓글 6개
이전에 사용하던 것인데 참 유용하게 썼지요.
오랫만에 보니 반갑네요... ^^
오랫만에 보니 반갑네요... ^^
감사합니다
감사합니다.
..........
아주 잘되네요
감사합니다
감사합니다
아무 반응이 없네요..ㅜㅡㅡ