iframe 폭, 높이 자동조절
메인페이지

<스크립트 Language='javascript'>
var ifrmWidth;
var ifrmHeight;
var objFrame;
var str;
var cstr;

function reSize() {
    try{
        if (ifrmWidth < 200) {//200은 최대 프레임 넓이
            objFrame.style.width = ifrmWidth ;
        }else{
            objFrame.style.width = 200;
        }

        if (ifrmHeight < 300) {//300은 최대 프레임 높이
            objFrame.style.height = ifrmHeight;
        }else{
            objFrame.style.height = 300;
        }
    }catch(e){
    }
}

function init_iframe() {
    try{
        objFrame = document.all["iframe이름"];
        str = window.clipboardData.getData("Text");
        cstr = str.split("|");
        ifrmWidth=     eval    (cstr[0]);
        ifrmHeight=     eval    (cstr[1]);
        reSize();
    }catch(e){
    }
}



<아이프레임 src=http://img.yahoo.co.kr/blank.gif name="iframe이름" width="200" height="300" marginwidth="0"
marginheight="0" frameborder="0" onl oad="init_iframe()" scrolling="no|yes|auto">


----------------------------------------------------------------------------------------
iframe 페이지


<스크립트 language="javascript">
window.clipboardData.setData('Text', document.body.scrollWidth+"|"+document.body.scrollHeight);
by 아앙 | 2007/03/14 09:56 | 트랙백 | 덧글(0)
트랙백 주소 : http://aang.egloos.com/tb/82026
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]

:         :

:

비공개 덧글



< 이전페이지 다음페이지 >