¹®¼­ °èÅëµµ»ó µÎ°³ÀÇ °³Ã¼ÀÇ À§Ä¡¸¦ ¸Â¹Ù²Û´Ù.

Àμö/ÆĶó¸ÞÅÍ
oNode
ÇʼöÀûÀÎ ¿ä¼ÒÀ̸ç, ±âÁ¸ ¿¤·¹¸àÆ®¸¦ ÁöÁ¤ÇÏ´Â °³Ã¼ÀÌ´Ù.
¹Ýȯ°ª

¹Ýȯ°ª oSwapped´Â ÀÌ ¸Þ¼­µå·Î À§Ä¡°¡ ¹Ù²ï °³Ã¼ÀÌ´Ù.

Ư±â

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

Àû¿ë
°³Ã¼scriptIE
ÂüÁ¶
cloneNode removeNode replaceNode (¿µ¹®)DOM(W3C Document Object Model)

swapNode ¸Þ¼­µå·Î µÎ °³Ã¼ÀÇ À§Ä¡¸¦ ¼­·Î ¹Ù²Û´Ù.

<SCRIPT>
function doSwap(){
  oList.children(0).swapNode(oList.children(1));
}
</SCRIPT>
<UL id=oList>
<LI>¸ñ·Ï Ç׸ñ 1
<LI>¸ñ·Ï Ç׸ñ 2
<LI>¸ñ·Ï Ç׸ñ 3
<LI>¸ñ·Ï Ç׸ñ 4
</UL>
<INPUT type = button value = "¸ñ·Ï ¹Ù²Ù±â" onclick = "doSwap()">