<HTML>
<head>
<script language='JavaScript' type='text/javascript'>
function resizeFrame(iframeObj){
var innerBody = iframeObj.contentWindow.document.body;
oldEvent = innerBody.onclick;
innerBody.onclick = function(){ resizeFrame(iframeObj, 1);oldEvent; };
var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
iframeObj.style.height = innerHeight;
var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
iframeObj.style.width = innerWidth;
if( !arguments[1] ) /* 특정 이벤트로 인한 호출시 스크롤을 그냥 둔다. */
this.scrollTo(1,1);
}
</script>
</head>
<body>
<h4>iframe 내 페이지 높이에 맞게 자동 조절하기
</h4>
<iframe name="wsos" id="wsos" src="/webdevdoc/index.php" style="width:100%"
frameborder="0" framespacing="0" scrolling="no" onLoad="resizeFrame(this);"></iframe>
</body>
</html>
'개발 세발 창고' 카테고리의 다른 글
Name jdbc is not bound in this Context (0) | 2009.05.11 |
---|---|
처음 이클립스와 톰캣 설치후 톰캣 실행이 안될 때 (0) | 2009.05.11 |
Jakarta POI(Excel 파일 DB에 올리기 위한 방법) (0) | 2009.03.31 |
OUTER JOIN의 사용 (0) | 2009.03.26 |
SQL COUNT 함수의 리턴 타입 (0) | 2009.03.25 |