[Javascript] - Iframe Auto Resize
Javascript 2011. 7. 1. 11:03반응형
<head>
<script>
function doResize()
{
changepage.height = ifrm.document.body.scrollHeight;
changepage.width = ifrm.document.body.scrollWidth;
}
</script>
</head>
사용법 ▼
<td id="changepage">
<iframe id="ifrm" name="ifrm" onload="doResize();" src="/admin/board/list2.php?BOARDID=report" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="0" scrolling="no">
</iframe>
</td>
<script>
function doResize()
{
changepage.height = ifrm.document.body.scrollHeight;
changepage.width = ifrm.document.body.scrollWidth;
}
</script>
</head>
사용법 ▼
<td id="changepage">
<iframe id="ifrm" name="ifrm" onload="doResize();" src="/admin/board/list2.php?BOARDID=report" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="0" scrolling="no">
</iframe>
</td>
반응형
'Javascript' 카테고리의 다른 글
[Javascript] - 이미지 슬라이드(Fade In & Fade Out & Prev Next Button) (0) | 2011.07.07 |
---|---|
[Javascript] - Auto Td Row span (0) | 2011.07.07 |
[Javascript] - Ajax로 페이지 Call하는법 (0) | 2011.06.29 |
[Javascript] - 동영상 제어 (0) | 2011.06.29 |
[Javascript] - 슬라이딩 터치 (0) | 2011.06.28 |