±âÁ¸ÀÇ ÀÚ½Ä ¿¤·¹¸àÆ®¸¦ »õ·Î¿î ÀÚ½Ä ¿¤·¹¸àÆ®·Î ±³Ã¼ÇÑ´Ù.

Àμö/ÆĶó¸ÞÅÍ
oNewNode
ÇʼöÀûÀÎ ¿ä¼ÒÀ̸ç, ¹®¼­¿¡ »ðÀÔÇÒ »õ·Î¿î ¿¤·¹¸àÆ®¸¦ ÁöÁ¤ÇÏ´Â °³Ã¼ÀÌ´Ù.

oChildNode
ÇʼöÀûÀÎ ¿ä¼ÒÀ̸ç, ±³Ã¼´çÇÒ ±âÁ¸ÀÇ ¿¤·¹¸àÆ®¸¦ ÁöÁ¤ÇÏ´Â °³Ã¼ÀÌ´Ù.

¹Ýȯ°ª

¹Ýȯ°ª oVal´Â ±³Ã¼µÈ °³Ã¼¸¦ ÂüÁ¶ÇÑ´Ù.

Ư±â

±³Ã¼µÉ ³ëµå(node)´Â ¸ðüÀÇ Á÷Á¢ÀûÀÎ ÀÚ½ÄÀ̾î¾ß ÇÑ´Ù.
»õ·Î¿î ³ëµå´Â createElement ¸Þ¼­µå¸¦ »ç¿ëÇÏ¿© »ý¼ºÇÏ¿©¾ß ÇÑ´Ù.

ÀÌ ¸Þ¼­µå´Â ·±Å¸ÀÓ(run time)¿¡ Á¢¼ÓÇÒ ¼ö ÀÖ´Ù. ·±Å¸ÀÓ¿¡¼­ ÀÌ ¿¤·¹¸àÆ®°¡ Á¾·áűװ¡ ÆĽ̵DZâ Àü¿¡ Á¦°ÅµÇ¸é, ¹®¼­ÀÇ Áö¿ªµéÀº Ç¥ÇöµÇÁö ¾ÊÀ» ¼ö ÀÖ´Ù.

IE6¿¡¼­´Â ÀÌ ¸Þ¼­µå°¡ attribute°³Ã¼µµ Àû¿ëµÈ´Ù.

Àû¿ë
A ACRONYM ADDRESS attribute B BDO BIG BLOCKQUOTE BODY BUTTON CAPTION CENTER CITE CODE COL COLGROUP COMMENT DD DEL DFN DIR DIV DL DT EM FIELDSET FONT FORM FRAMESET HEAD hn HTML I IFRAME INPUT type=button INPUT type=checkbox INPUT type=file INPUT type=hidden INPUT type=image INPUT type=password INPUT type=radio INPUT type=reset INPUT type=submit INPUT type=text INS KBD LABEL LEGEND LI LISTING MAP MARQUEE MENU nextID OL OPTION P PLAINTEXT PRE Q S SAMP SELECT SMALL SPAN STRIKE STRONG SUB SUP TABLE TBODY TD TEXTAREA TFOOT TH THEAD TR TT U UL VAR XMP
ÂüÁ¶
createElement

ÀÌ ¸Þ¼­µå´Â (¿µ¹®)DOM1(W3C Document Object Model Level 1)¿¡¼­ Á¤ÀǵǾú´Ù.


¿©±â¸¦ Ŭ¸¯ÇÏ¸é ¿¤·¹¸àÆ®°¡ ±³Ã¼µÈ´Ù.
Div1.children[0].nodeName=

replaceChild ¸Þ¼­µå·Î div ¼ÓÀÇ ÀÚ½Ä ¿¤·¹¸àÆ®¸¦ b¿Í i µÎ ¿¤·¹¸à·Î ±³Ã¼ÇÑ´Ù.

<HEAD>
<SCRIPT>
function replaceElement(){
  var oChild=Div1.children(0);
  var textObj = oChild.innerHTML;
  if (oChild.tagName=='B'){
    oNewChild=document.createElement('I');
    Div1.replaceChild(oNewChild,oChild);
    oNewChild.innerHTML=textObj
  } else {
    oNewChild=document.createElement('B');
    Div1.replaceChild(oNewChild,oChild);
    oNewChild.innerHTML=textObj
  }
  showA.innerHTML=Div1.children[0].nodeName;
}
</SCRIPT>
</HEAD>
<BODY>
<DIV id=Div1 onclick="replaceElement()" style="border:solid 1 blue">¿©±â¸¦ Ŭ¸¯Çϸé <B>¿¤·¹¸àÆ®</B>°¡ ±³Ã¼µÈ´Ù.</DIV>
<DIV>Div1.children[0].nodeName=<B><SPAN id=showA>
<SCRIPT>document.write(Div1.children[0].nodeName)</SCRIPT>
</SPAN></B></DIV>
</BODY>