웹표준에서 아이프레임
페이지 정보
작성일13-02-27 22:39 조회1,424회본문
<head> </head> 사이에
<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="http://게시판주소" name="ifrm" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="no" onload="init()" scrolling="no"></iframe>
★아이프레임에 삽입된 게시판(관리자모드)으로 가셔서 "게시판 하단에 출력할 내용 부분에"★
</div>
<script language="javascript">
window.clipboardData.setData('Text', document.body.scrollWidth+"|"+document.body.scrollHeight);
</script>
그런데 그닥 효율성은.. ^^;;
<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="http://게시판주소" name="ifrm" width="100%" height="100%" marginwidth="0" marginheight="0" frameborder="no" onload="init()" scrolling="no"></iframe>
★아이프레임에 삽입된 게시판(관리자모드)으로 가셔서 "게시판 하단에 출력할 내용 부분에"★
</div>
<script language="javascript">
window.clipboardData.setData('Text', document.body.scrollWidth+"|"+document.body.scrollHeight);
</script>
그런데 그닥 효율성은.. ^^;;