¹®¼­ÀÇ °èÅëµµ¿¡¼­ °³Ã¼¸¦ Á¦°ÅÇÑ´Ù.

Àμö/ÆĶó¸ÞÅÍ
bRemoveChildren
¼±ÅÃÀûÀÎ ¿ä¼ÒÀ̸ç, ÀÚ½Ä °³Ã¼µéÀÌ Á¦°ÅµÇ´Â°¡¸¦ ³ªÅ¸³»´Â ºÎ¿ï°ªÀÌ´Ù
false µðÆúÆ®À̸ç, °³Ã¼ÀÇ childNodes Ä÷º¼ÇÀÌ Á¦°ÅµÇÁö ¾Ê´Â´Ù.
true childNodes Ä÷º¼ÇÀÌ Á¦°ÅµÈ´Ù.
¹Ýȯ°ª

¹Ýȯ°ª oValÀº Á¦°ÅµÈ °³Ã¼ÀÇ ÂüÁ¶ÀÌ´Ù.

Ư±â

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

Àû¿ë
A ACRONYM ADDRESS 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=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 OBJECT OL OPTION P PLAINTEXT PRE Q S SAMP SELECT SMALL SPAN STRIKE STRONG STYLE SUB SUP TABLE TBODY TD TEXTAREA TFOOT TH THEAD TR TT U UL VAR XMP
ÂüÁ¶
appendChild cloneNode insertBefore (¿µ¹®)DOM(W3C Document Object Model)

Ä­ 1-1Ä­ 1-2
Ä­ 2-1Ä­ 2-2

°á°ú Ç¥½Ãâ

removeNode ¸Þ¼­µå·Î °èÅëµµ»ó¿¡¼­ Å×À̺íÀ» Á¦°ÅÇÑ´Ù.
ÆĶó¸ÞÅÍ true¿Í falseÀÇ Â÷À̸¦ º¸¶ó. Çѹø Á¦°ÅÇÏ¸é »õ·Î°íħÀ» ÇؾßÇÑ´Ù.

<SCRIPT>
function doRemove(bVal){
  if (!document.all('oTable')){
    alert('oTableÀÌ ÀÌ¹Ì Á¦°ÅµÇ¾ú´Ù. »õ·Î°íħ ÈÄ¿¡ ´Ù½Ã ½ÃµµÇ϶ó.');
    return false;
  }
  oTable.removeNode(bVal);
  str='oTable.removeNode('+bVal+')<BR>';
  str+='parentDiv.all.length='+parentDiv.all.length+'<BR>';
  if (parentDiv.all.length){
    for (i=0;i< parentDiv.all.length;i++){
      str+='parentDiv.all['+i+'].nodeName='+parentDiv.all[i].nodeName+', ';
      str+='parentDiv.all['+i+'].innerText='+parentDiv.all[i].innerText+'<BR>';
    }
    but1.disabled=but2.disabled=true;
  }
  showA.innerHTML=str;
}
</SCRIPT>
<DIV id=parentDiv>
<TABLE id=oTable border=1 width=400>
<TR><TD id="cell11">Ä­ 1-1</TD><TD>Ä­ 1-2</TD></TR>
<TR><TD>Ä­ 2-1</TD><TD>Ä­ 2-2</TD></TR>
</TABLE>
</DIV>
<BUTTON onclick="doRemove(true)" style=width:200>oTable.removeNode(true)</BUTTON>
<BUTTON onclick="doRemove(false)" style=width:200>oTable.removeNode(false)</BUTTON><BR>
<!-- <BUTTON onclick="location.reload()" style=width:400>¹®¼­ »õ·Î°íħ</BUTTON> -->
<DIV id=showA>°á°ú Ç¥½Ãâ</DIV>