Javascript
[Javascript] - Iframe Auto Resize
Vivara
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>
반응형