ÁöÁ¤µÈ °ªÀ¸·Î ÅؽºÆ® ¹®ÀÚ¿­ °³Ã¼¸¦ »ý¼ºÇÑ´Ù.

Àμö/ÆĶó¸ÞÅÍ
sText

¼±ÅÃÀûÀÎ ¿ä¼ÒÀ̸ç, ÅؽºÆ® ³ëµåÀÇ nodeValue ¼Ó¼ºÀ» ÁöÁ¤ÇÏ´Â ¹®ÀÚ¿­ÀÌ´Ù.

¹Ýȯ°ª

¹Ýȯ°ª newObjÀº »ý¼ºµÈ TextNode °³Ã¼ÀÌ´Ù.

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

ÀÌ ¸Þ¼­µå´Â (¿µ¾î)DOM Level 1(Document Object Model Level 1)¿¡¼­ Á¤ÀǵǾú´Ù.


ÃÖÃÊÀÇ ¹®ÀÚ¿­

ÃÖÃÊÀÇ ¹®ÀÚ¿­ ¹Ú½º¸¦ Ŭ¸¯Çغ¸¶ó.

<SCRIPT>
function newNode(){
  var newObj=document.createTextNode('»õ·Î¿î ¹®ÀÚ¿­');
  var replaceObj=spanObj.childNodes(0);
  replaceObj.replaceNode(newObj);
}
</SCRIPT>
<SPAN id="spanObj" onclick="newNode()">ÃÖÃÊÀÇ ¹®ÀÚ¿­</SPAN>