|
|
|
10-11-19
|
조회 1,057
|
|
|
|
10-11-19
|
조회 964
|
|
|
|
10-11-18
|
조회 868
|
|
|
|
10-11-18
|
조회 1,062
|
|
|
|
10-11-18
|
조회 1,893
|
|
|
|
10-11-18
|
조회 1,034
|
|
|
|
10-11-18
|
조회 1,119
|
|
|
|
10-11-18
|
조회 855
|
|
|
|
10-11-18
|
조회 2,408
|
|
|
|
10-11-18
|
조회 966
|
|
|
|
10-11-18
|
조회 1,662
|
|
|
|
10-11-18
|
조회 938
|
|
|
|
10-11-18
|
조회 1,153
|
|
|
|
10-11-18
|
조회 1,177
|
|
|
|
10-11-18
|
조회 1,635
|
|
|
|
10-11-18
|
조회 1,645
|
|
|
|
10-11-18
|
조회 1,648
|
|
|
|
10-11-18
|
조회 1,759
|
|
|
|
10-11-18
|
조회 1,681
|
|
|
|
10-11-18
|
조회 1,871
|
댓글 3개
<head>
<title> 프레임 사이즈 자동조절 </title>
<script type="text/javascript">
/*******************Iframe 내용만큼 자동 Resize START **********************/
var iframeids=["htmlframe"]; //iframe 사이즈 자동조절
var iframehide="yes" ;
//실행순서 : 1
function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}
//실행순서 : 2
function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+10;
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight+10;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent)
currentfr.attachEvent("onload", readjustIframe)
}
//작업종료후 최종 윈도우 Onload
loadWindowResize();
}
//실행순서 : ?
function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}
//실행순서 : ?
function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}
//실행순서 : 5
function loadWindowResize(){
if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller
}
/*******************Iframe 내용만큼 자동 Resize END **********************/
</script>
</head>
<body>
<iframe name='htmlframe' id='htmlframe' src='http://www.naver.com' frameborder='0' width='100%' height='100%' scrolling='No' title='네이버' allowtransparency='true'></iframe>
</body>
</html>