¹®¼­ °èÅëµµ¿¡¼­ ¸ðü °³Ã¼¸¦ ¹ÝȯÇÑ´Ù.

Àμö
object
ÇʼöÀûÀÎ ¿ä¼ÒÀ̸ç, object´Â Àû¿ëÇÒ ¼ö ÀÖ´Â °³Ã¼µé Áß ÇϳªÀÌ´Ù.

: (¼Ó¼º °³Ã¼)
¼Ó¼º°ªÀº °³Ã¼ÀÇ °èÅëµµ »ó °³Ã¼ÀÇ ¹Ù·Î »óÀ§ÀÇ °³Ã¼ÀÌ´Ù.

ÀÌ ¼Ó¼ºÀº ÀбâÀü¿ëÀÌ¸ç µðÆúÆ®°ªÀº ¾ø´Ù.

Ư±â

ÃÖ»óÀ§ °³Ã¼¿¡¼­´Â ¸ðü °³Ã¼ nullÀ» ¹ÝȯÇÑ´Ù.

Àû¿ë
°³Ã¼scriptHTML±Ô°ÝIE
Âü°í

À̼ӼºÀº IE6ºÎÅÍ attribute °³Ã¼¿¡µµ Àû¿ëµÈ´Ù.

ÀÌ ¼Ó¼ºÀº (¿µ¹®) W3C DOM Level 1(Document Object Model)¿¡¼­ Á¤ÀǵǾú´Ù.


SPAN id=spanObj
<STYLE>xmp{margin:0;padding:0;color:teal}</STYLE>
<DIV id=divBox style="border:solid 1 blue"><SPAN id=spanObj>SPAN id=spanObj</SPAN></DIV>
<SCRIPT>
document.write('<XMP>'+divBox.innerHTML+'</XMP>');
document.write('spanObj.parentNode.nodeName='+spanObj.parentNode.nodeName+'<BR>');
var newBObj=document.createElement('B');
spanObj.insertBefore(newBObj);
newBObj.innerText=' »õ·Î »ý¼ºµÈ ¿¤·¹¸àÆ®';
document.write('newBObj.nodeName='+newBObj.nodeName+'<BR>');
document.write('newBObj.parentNode.nodeName='+newBObj.parentNode.nodeName);
document.write('<XMP>'+divBox.innerHTML+'</XMP>');
</SCRIPT>

<SCRIPT>
str='document.body.parentElement.nodeName='+document.body.parentNode.nodeName+'<BR>';
str+='document.all.tags("tBody")(0).parentNode.nodeName='+document.all.tags("tBody")(0).parentNode.nodeName+'<BR>';
str+='document.all.tags("tr")(0).parentNode.nodeName='+document.all.tags("tr")(0).parentNode.nodeName+'<BR>';
str+='document.all.tags("td")[0].parentNode.nodeName='+document.all.tags("td")[0].parentNode.nodeName+'<BR>';
document.write(str);
</SCRIPT>