반응형

JS 파일

 

<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>

 

 

 

삽입

 

<iframe src="게시판 주소" name="ifrm" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="no" onload="init()" scrolling="no"></iframe>

 

 

 

 

제로보드 버전에 따라 다르지만 모듈-게시판-게시판정보-게시판관리에 하단내용에 반드시 넣어야한다.

 

 

 

<script language="javascript">

window.clipboardData.setData('Text', document.body.scrollWidth+"|"+document.body.scrollHeight);

</script>

반응형

'프로그래밍 > Javascript' 카테고리의 다른 글

iframe resize jquery 아이 프레임 리사이징 소스  (0) 2016.02.02
셀렉트 박스 링크 걸기  (0) 2016.01.30
eval()  (0) 2015.11.21
for 문 -- 별 삼각형 출력하기  (0) 2015.10.14
switch 문  (0) 2015.10.11

+ Recent posts