팝업창 안에 iframe 다루기..

컴터/Javascript / html 2008. 5. 8. 00:05



--------------------------------------------------------------------------
부모창
--------------------------------------------------------------------------

<a onclick="nw = window.open('pop.html', 'pop2', 'width=500 height=500')">1. 새창</a>

<br /><br>

<a onclick="nw.ifm.location.href='http://empas.com';">2. 엠파스로</a>
<br><br>
<a onclick="nw.document.getElementById('ifm').src='http://phpschool.com';he();">3. 바뀜</a>

<script>
function he(){
 ifrmx=nw.document.getElementById('ifm');

 h = parseInt(ifrmx.height);
 w = parseInt(ifrmx.width);
 ifrmx.height=h-10;
 ifrmx.width=w-10;

 if(h > 100)
 setTimeout("he()", 500);
}
</script>


--------------------------------------------------------------------------
팝업창
--------------------------------------------------------------------------

팝업창

<br /><br /><br />

<iframe src="http://daum.net" width="500" height="200" name="ifm" id="ifm"></iframe>

Trackbacks 0 : Comments 0

Write a comment