ùȸé À°¾Æ±³À° À¥µðÀÚÀÎ ¿ä¸®¸Þ¸ð ÇÑÀÚ¾²±â
ºÎ¸ðÆäÀÌÁö¿Í Iframe °£ÀÇ ÀÚ¹Ù½ºÅ©¸³Æ® ÁÖ°í ¹Þ±âÀ̸ç Á¤¸» °£´ÜÇѰŴÙ...±Ùµ¥ ³ º¸Åë ¿ÀºêÁ§Æ®¸¦ ãÀ»¶§ ÀÌ·¸°Ô ÀÛ¾÷À» ÇÑ´Ù.
document.getElementById("testframe")
ÇÏÁö¸¸ ¾ÆÀÌÇÁ·¹ÀÓ Á¢±ÙÇÒ·Á´Ï À̰ԾȸÔÈ÷³×...;;;;;
document.testframe.¸Þ¼Òµå(); ¿ä·¸°Ô¸¸ Á¢±ÙÀÌ °¡´ÉÇÏ´Ù...
³ª¸¸±×·±°ÇÁö....
ºÎ¸ðÆäÀÌÁö
<html>
<head>
<title>Á¦¸ñ ¾øÀ½</title> <script>
//testframe(¾ÆÀÌÇÁ·¹ÀÓ) ¾ÈÀÇ test(); ¸Þ¼Òµå È£Ãâ
function getContent(){ try{ document.testframe.test(); }catch(e) { alert(e); } }
//¾ÆÀÌÇÁ·¹ÀÓ¿¡¼ È£ÃâÇÒ ÀÚ¹Ù½ºÅ©¸³Æ® function setContent(){ alert("setContent "); } </script> </head>
<body> ¾ÆÀÌÇÁ·¹ÀÓ È£Ãâ<br /> <br /> <input type="button" value="¾ÆÀÌÇÁ·¹ÀӾȿ¡ÀÖ´Â ÀÚ¹Ù½ºÅ©¸³Æ®È£Ãâ" onclick="getContent();" /> <br /> <br /> <iframe id="testframe" src="HTMLPage2.htm" width="200" height="100" name="testframe"></iframe>
</body>
</html>
-------------------------------------------------------------------------------------------------------
ºÎ¸ðÇÁ·¹ÀӾȿ¡ ¼ÓÇØÀÖ´Â ¾ÆÀÌÇÁ·¹ÀÓ
<script> function test(){ alert(" iframe method "); } function Button1_onclick() { try{ parent.setContent(); }catch(e){ alert(e); } }
</script> </head>
<body bgcolor="activeborder"> <input id="Button1" type="button" value="ºÎ¸ðÀÚ¹Ù½ºÅ©¸³Æ® È£Ãâ" onclick="return Button1_onclick()" />