 |
|
|  |
| [script] iframe 자동리사이즈(파이어폭스, 익스 지원) |
|
|
 |
16년 전 |
[script] iframe 자동리사이즈(파이어폭스, 익스 지원)
<script language="javascript">
<!--
function resize_frame(obj){
var obj_document = obj.contentWindow.document;
if(obj_document.height){
obj.style.height = obj_document.height;
obj.style.width = obj_document.width;
} else {
obj.style.height = obj_document.body.scrollHeight;
obj.style.width = obj_document.body.scrollWidth;
}
}
//-->
</script>
<iframe src="링크주소" width='100%' height='100%' marginwidth='0' marginheight='0' frameborder='no' scrolling='no' onload='resize_frame(this)' name="iframe_list" id="iframe_list" target="_self"></iframe>
------------------------------------------------------------------
iframe 창 크기 내용에따라 변하게 하기
<script>
function resizeFrame(iframeObj){
var innerBody = iframeObj.contentWindow.document.body;
var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
iframeObj.style.height = innerHeight;
iframeObj.style.width = innerWidth;
}
</script>
<iframe src="filename.html" name="iframe1" frameborder="0" scrolling="no" onload="resizeFrame(this)"></iframe>
|
|
추천 : 800 |
추천
목록
|
|
|  |
|