innerHTML, outerHTML, innerText, outerText, ¼Ó¼º ¿¹Á¦
°á°ú Ç¥½Ãâ
¿¹Á¦ÀÇ °³Ã¼¸¦ Ŭ¸¯ÇØ º¸¶ó. <STYLE>xmp {margin:0;padding:2}</STYLE> <SCRIPT> function copyHTML(obj){ str=''; str='¸ñ·ÏÀÇ '+ obj.id+'¸¦ º¹»çÇÑ´Ù.<OL>'; str+='<LI>obj.innerHTML='+obj.innerHTML+'<BR>'; str+='<XMP>'+obj.innerHTML+'</XMP>'; str+='<LI>obj.outerHTML='+obj.outerHTML+'<BR>'; str+='<XMP>'+obj.outerHTML+'</XMP>'; str+='<LI>obj.innerText='+obj.innerText+'<BR>'; str+='<XMP>'+obj.innerText+'</XMP>'; str+='<LI>obj.outerText='+obj.outerText+'<BR>'; str+='<XMP>'+obj.outerText+'</XMP></OL>'; showA.innerHTML=str; } </SCRIPT> <UL> <LI id=LI1 onclick="copyHTML(this)"><B style=color:red>B ¹®<SUP>ÀÚ</SUP>¿</B> <LI id=LI2 onclick="copyHTML(this)"><FONT color=blue size=4>FONT ¹®ÀÚ¿</FONT> <LI id=LI3 onclick="copyHTML(this)"><U style="font-family:±Ã¼;font-size:150%">U ¹®ÀÚ¿</U> </UL> <SPAN id=S4 onclick="copyHTML(this)"><I id=i1" style="color:brown">i ¹®ÀÚ¿</I> ÀÌ´Ù.</SPAN> <DIV id="showA">°á°ú Ç¥½Ãâ</DIV> |