아이프레임 자동으로 늘어나는 자바 스크립트 입니다.

· 10년 전 · 304

<script Language='javascript'>
var ifrmHeight;
var objFrame;
var str;
var cstr;

function init() {
                try{
                        objFrame = document.all["ifrm"];
                        str = window.clipboardData.getData("Text");
                        cstr = str.split("|");
                        ifrmHeight= eval(cstr[1]);       
        }catch(e){
                }
}

function reSize() {
                try{                       
                        if (ifrmHeight > 240) {
                                        objFrame.style.height = ifrmHeight;
                        }else{
                                        objFrame.style.height = 240;
                        }                       
        }catch(e){
                }
}

function init_iframe() {       
        reSize();       
        setTimeout("init_iframe()",100);
}

init_iframe();
</script>

<script language="javascript">
window.clipboardData.setData('Text', document.body.scrollWidth+"|"+document.body.scrollHeight);
 </script>

|
댓글을 작성하시려면 로그인이 필요합니다.

팁게시판

디자인과 관련된 유용한 정보를 공유하세요. 질문은 상단의 QA에서 해주시기 바랍니다.

+
제목 글쓴이 날짜 조회
10년 전 조회 288
10년 전 조회 292
10년 전 조회 336
10년 전 조회 248
10년 전 조회 262
10년 전 조회 440
10년 전 조회 281
10년 전 조회 338
10년 전 조회 303
10년 전 조회 352
10년 전 조회 460
10년 전 조회 332
10년 전 조회 305
10년 전 조회 325
10년 전 조회 427
10년 전 조회 340
10년 전 조회 289
10년 전 조회 297
10년 전 조회 304
10년 전 조회 258
10년 전 조회 269
10년 전 조회 451
10년 전 조회 520
10년 전 조회 302
10년 전 조회 290