![](/bink.gif) |
|
| ![](/bink.gif) |
iframe ³»¿ë¿¡ ¸Â°Ô ÀÚµ¿À¸·Î Å©±â Á¶ÀýÇϱâ |
|
|
![](icon/private_name/1.gif) ȨÆäÀÌÁö |
19³â Àü |
iframe¿¡ µé¾î°¡´Â ¹®¼¿¡ »ðÀÔÇØÁÖ¼Å¾ß ÇÕ´Ï´Ù~ *^^*
<script>
function resizeFrame(name){
var oBody = document.body;
var oFrame = parent.document.all(name);
var min_height = 320; //iframeÀÇ ÃÖ¼Ò³ôÀÌ(³Ê¹« ÀÛ¾ÆÁö´Â °É ¸·±âÀ§ÇÔ, Çȼ¿´ÜÀ§, ÆíÁý°¡´É)
var min_width = 465; //iframeÀÇ Ãּҳʺñ
var i_height = oBody.scrollHeight + (oBody.offsetHeight-oBody.clientHeight);
var i_width = oBody.scrollWidth + (oBody.offsetWidth-oBody.clientWidth);
if(i_height < min_height) i_height = min_height;
if(i_width < min_width) i_width = min_width;
oFrame.style.height = i_height;
oFrame.style.width = i_width;
parent.scrollTo(1,1); //ºÎ¸ð¹®¼ÀÇ ½ºÅ©·Ñ À§Ä¡¸¦ 1, 1·Î ¿Å±ä´Ù
}
</script>
À§ ÇÔ¼ö¸¦ »ðÀÔÇÏ°í, ¹®¼ Á¦ÀÏ ¾Æ·¡ÂÊ¿¡
<script>
var oldFn = "";
if(window.onload != null){
oldFn = new String(window.onload); //window.onloadÀÇ ÇÔ¼ö¸¦ ¹®ÀÚ¿·Î ¹Þ´Â´Ù
oldFn = oldFn.substring(22,oldFn.length-2);
}
window.onload = new Function("resizeFrame(FRAMEID);" + oldFn); //»õÇÔ¼ö¿Í ±âÁ¸ÀÇ ÇÔ¼ö¸¦ Ãß°¡Çؼ onloadÀ̺¥Æ®¿¡ ÇÒ´ç
</script>
¸¦ »ðÀÔÇØÁÖ¼¼¿ä. °¡²û¾¿ body¿¡ onLoad À̺¥Æ®¸¦ ¾²½Ã´Â ºÐµéÀÌ Àִµ¥ ±× ºÐµéÀ» À§ÇÑ ÇÔ¼öÀÔ´Ï´Ù.
»ç¿ëÇϽǶ©
iframe¿¡ id¿Í name ¼Ó¼ºÀ» °°Àº À̸§À¸·Î ÇÒ´çÇÏ¼Å¾ß ÇÕ´Ï´Ù.
¿¹)
<iframe id=innerFrame name=innerFrame></iframe>
<script>
...(»ý·«)
window.onload = newFunction("resizeFrame('innerFrame');" + oldFn);
</script>
Á¦·Îº¸µå ¾²½Ã´Â ºÐµéÀº
<script>
var oldFn = "";
if(window.onload != null){
oldFn = new String(window.onload); //window.onloadÀÇ ÇÔ¼ö¸¦ ¹®ÀÚ¿·Î ¹Þ´Â´Ù
oldFn = oldFn.substring(22,oldFn.length-2);
}
window.onload = new Function("resizeFrame(FRAMEID);" + oldFn); //»õÇÔ¼ö¿Í ±âÁ¸ÀÇ ÇÔ¼ö¸¦ Ãß°¡Çؼ onloadÀ̺¥Æ®¿¡ ÇÒ´ç
</script>
ÀÌ ºÎºÐÀ»
<script>
var oldFn = new String(window.onload);
window.onload = new Function("resizeFrame(FRAMEID);" + oldFn); //»õÇÔ¼ö¿Í ±âÁ¸ÀÇ ÇÔ¼ö¸¦ Ãß°¡Çؼ onloadÀ̺¥Æ®¿¡ ÇÒ´ç
</script>
ÀÌ·¸°Ô ¹Ù²ãÁÖ¼¼¿ä.
|
|
̵̧ : 405 |
̵̧
¸ñ·Ï
|
|
| ![](/bink.gif) |
|