¹®¼­ÀÇ °èÅëµµ¿¡¼­ ³ëµå(node)·Î¼­ÀÇ ÅýºÆ® ¹®ÀÚ¿­À» ÂüÁ¶ÇÑ´Ù.

Script [propVal=]..propName;
HTML ¾ø´Ù.
Ư±â

TextNode °³Ã¼´Â createTextNode ¸Þ¼­µå¸¦ »ç¿ëÇÏ¿© »ý¼ºÇÑ´Ù. TextNode °³Ã¼°¡ »ý¼ºµÈ µÚ¿¡´Â appendChild, replaceNode³ª insertBefore ¸Þ¼­µå¸¦ »ç¿ëÇÏ¿© Ãß°¡Çϰųª ¼öÁ¤ÇÒ ¼ö ÀÖ´Ù.

ÀÌ °³Ã¼´Â IE5 À̻󿡼­ ½ºÅ©¸³Æ®¸¦ »ç¿ëÇÒ ¼ö ÀÖ´Ù.

ÂüÁ¶

ÀÌ °³Ã¼´Â (¿µ¹®)HTML3.2¿¡¼­ Á¤ÀǵǾú´Ù.


¼³¸íÀ» À§ÇÑ ¿¹Á¦

  1. Ç׸ñ 1
  2. Ç׸ñ 2
  3. Ç׸ñ 3
  4. Ç׸ñ 4

data ¼Ó¼º IE
¢¡ °³Ã¼ÀÇ °ªÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.
¹®¹ý: .data[=vVal]
ÄÚµå: document.write(oObj.data) °á°ú:
length ¼Ó¼º IE
¢¡ °³Ã¼ÀÇ ±ÛÀÚ¼ö ±æÀ̸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: [iVal=].length
ÄÚµå: document.write(oObj.length) °á°ú:
nextSibling ¼Ó¼º IE
¢¡ ÀÇ ¸ðü °³Ã¼ÀÇ ´ÙÀ½ ÀÚ½Ä °³Ã¼À» ¹ÝȯÇÑ´Ù.
¹®¹ý: [oVal=].nextSibling
ÄÚµå: document.write(oObj.nextSibling) °á°ú:
ÄÚµå: if (oObj.nextSibling) document.write(oObj.nextSibling.innerText) °á°ú:
nodeName ¼Ó¼º IE
¢¡ °³Ã¼ÀÇ ³ëµå(node) Çü½ÄÀ» ¹ÝȯÇÑ´Ù.
¹®¹ý: [sVal=].nodeName
ÄÚµå: document.write(oObj.nodeName) °á°ú:
nodeType ¼Ó¼º IE
¢¡ °³Ã¼ÀÇ ¿äûµÈ ³ëµå(node)ÀÇ Çü½ÄÀ» ¹ÝȯÇÑ´Ù.
¹®¹ý: [iVal=].nodeType
ÄÚµå: document.write(oObj.nodeType) °á°ú:
nodeValue ¼Ó¼º IE
¢¡ °³Ã¼ÀÇ ³ëµå(node)°ªÀ» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.
¹®¹ý: .nodeValue[=sVal]
ÄÚµå: document.write(oObj.nodeValue) °á°ú:
parentNode ¼Ó¼º IE
¢¡ ¹®¼­ÀÇ °èÅëµµ»ó °³Ã¼ÀÇ ¸ðü °³Ã¼¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: [oVal=].parentNode
ÄÚµå: document.write(oObj.parentNode) °á°ú:
ÄÚµå: document.write(oObj.parentNode.nodeName) °á°ú:
previousSibling ¼Ó¼º IE
¢¡ ¹®¼­ÀÇ °èÅëµµ»ó °³Ã¼ÀÇ ¸ðü¿¡ ¼Ò¼ÓµÈ ´ÙÀ½ ÇüÁ¦ °³Ã¼¸¦ ¹ÝȯÇÑ´Ù.
¹®¹ý: [Val=].previousSibling
ÄÚµå: document.write(o1Obj.previousSibling) °á°ú:
ÄÚµå: if (o1Obj.previousSibling) document.write(o1Obj.previousSibling.nodeName) °á°ú:

¸Þ¼­µå¼³¸í
appendData IE6 °³Ã¼¿¡ »õ·Î¿î ±ÛÀÚ ¹®ÀÚ¿­À» Ãß°¡ÇÑ´Ù.
deleteData IE6 °³Ã¼¿¡¼­ ÁöÁ¤µÈ ±ÛÀÚµéÀ» Á¦°ÅÇÑ´Ù.
insertData IE6 °³Ã¼¿¡¼­ ÁöÁ¤µÈ ±ÛÀÚµéÀ» »ðÀÔÇÑ´Ù.
replaceData IE6 °³Ã¼¿¡¼­ ÁöÁ¤µÈ ±ÛÀÚµéÀÇ ¹üÀ§¸¦ »õ·Î¿î ¹®ÀÚ¿­·Î ±³Ã¼ÇÑ´Ù.
splitText ÁöÁ¤ÇÑ »öÀÎ(index)¿¡¼­ÀÇ ¹®ÀÚ¿­ ³ëµå¸¦ ºÐ¸®ÇÑ´Ù.
substringData IE6 °³Ã¼·ÎºÎÅÍ ÁöÁ¤µÈ ±ÛÀÚµéÀÇ ¹üÀ§¸¦ ÃßÃâÇÑ´Ù.

°³Ã¼ ¿¹Á¦

Ç׸ñ Á¦¸ñ 1
Ç׸ñ ³»¿ë 1
Ç׸ñ Á¦¸ñ 2
Ç׸ñ ³»¿ë 2
Ç׸ñ Á¦¸ñ 3
Ç׸ñ ³»¿ë 3
°á°ú Ç¥½Ãâ

Ç׸ñÀ̳ª Á¦¸ñÀ» Ŭ¸¯ÇÏ¸é °ªÀÌ ¹Ù²ï´Ù.

<STYLE>dl.samp dt, dl.samp dd{border:solid 1 blue;padding;3;background:ffc}</STYLE>
<SCRIPT>
function doChanget(obj){
  TextNodeObj=document.createTextNode('»õ·Î¿î µ¥ÀÌÅÍ');
  obj.firstChild.replaceNode(TextNodeObj);
  showA.innerHTML='<'+obj.nodeName+' id='+obj.id+'>  nodeValue='+obj.firstChild.nodeValue;
}
</SCRIPT>
<DL id=dlObj class=samp>
<DT id=dt1 onclick='doChanget(this)'>Ç׸ñ  Á¦¸ñ 1
<DD id=dd1 onclick='doChanget(this)'>Ç׸ñ ³»¿ë 1
<DT id=dt2 onclick='doChanget(this)'>Ç׸ñ  Á¦¸ñ 2
<DD id=dd2 onclick='doChanget(this)'>Ç׸ñ ³»¿ë 2
<DT id=dt3 onclick='doChanget(this)'>Ç׸ñ  Á¦¸ñ 3
<DD id=dd3 onclick='doChanget(this)'>Ç׸ñ  ³»¿ë 3
</DL>
<BUTTON onclick="doChanget(dlObj.firstChild);this.disabled=true">ù Ç׸ñ Á¦¸ñÀ» º¯°æ½ÃŲ´Ù.</BUTTON>
<DIV id=showA>°á°ú Ç¥½Ãâ</DIV>