¾ÖÆ®¸®ºäÆ®°ªÀÌ ÁöÁ¤µÇ¾ú´ÂÁö¸¦ ºÎ¿ï°ªÀ¸·Î ¹ÝȯÇÑ´Ù.

Àμö
: (¼Ó¼º ºÎ¿ï°ª)
¼Ó¼º°ªÀº ¾ÖÆ®¸®ºäÆ®ÀÇ °ªÀÌ ÁöÁ¤µÇ¾ú´ÂÁö¸¦ ³ªÅ¸³»´Â ºÎ¿ï°ªÀÌ´Ù.

true ¾ÖÆ®¸®ºäÆ®°¡ ÁöÁ¤µÇ¾ú´Ù.
false ¾ÖÆ®¸®ºäÆ®°¡ ÁöÁ¤µÇÁö ¾Ê¾Ò´Ù.

ÀÌ ¼Ó¼ºÀº ÀбâÀü¿ëÀÌ¸ç µðÆúÆ®°ªÀº ¾ø´Ù.

Ư±â

¾ÖÆ®¸®ºäÆ®´Â HTML À̳ª ½ºÅ©¸³Æ®¸¦ ÅëÇÏ¿© ÁöÁ¤ÇÒ ¼ö ÀÖ´Ù.

Àû¿ë
°³Ã¼scriptHTML±Ô°ÝIE
Âü°í

ÀÌ ¼Ó¼ºÀº (¿µ¹®) W3C DOM Level 1(Document Object Model)¿¡¼­ Á¤ÀǵǾú´Ù.


°á°ú Ç¥½Ãâ
SPAN ¼Ó¼º º¸±â SUP ¼Ó¼º º¸±â
DIV ¼Ó¼º º¸±â

°³Ã¼¿¡ ¼³Á¤µÈ ¾ÖÆ®¸®ºäÆ®¸¦ ¾Ë±â À§ÇÏ¿© specified ¼Ó¼ºÀ» »ç¿ëÇÏ¿´´Ù.
±â´ÉÇÔ¼ö´Â °¢ ¾ÖÆ®¸®ºäÆ®¸¦ Á¡°ËÇÏ¿© °¢ ¾ÖÆ®¸®ºäÆ®¿Í °ªÀ» ¸ñ·ÏÈ­ ÇÑ´Ù.

<STYLE>.clickBox{border:solid 1 blue;background:ffa}</STYLE>
<SCRIPT>
function fnFindSpecified(obj){
  strSpc='<OL>';
  notstrSpc='<OL>';
  attributesCol=obj.attributes;
  str='<TABLE border=1 width=600>';
  str+='<TR><TD colspan=2>obj.nodeName='+obj.nodeName+' | ';
  str+='obj.attributes.length='+attributesCol.length+'</TD></TR>';
  str+='<TR><TH>specified</TH><TH>ÁöÁ¤ ¾øÀ½</TH></TR>';
  str+='<COL style=white-space:nowrap;text-algin:top><COL style=white-space:nowrap;text-algin:top>';
  for(var i=0;i< attributesCol.length;i++){
    if (attributesCol[i].nodeValue!=null){
      strSpc+='<LI><FONT color=green>'+
        attributesCol(i).nodeName+'</FONT>=<FONT color=blue>'+attributesCol(i).nodeValue+'</FONT>';
    } else {
      notstrSpc+='<LI><FONT color=green>'+
        attributesCol(i).nodeName+'</FONT>=<FONT color=gray>'+attributesCol(i).nodeValue+'</FONT>';
    }
  }
  str+='<TR><TD>'+strSpc+'</OL></TD><TD>'+notstrSpc+'</TD></TR></TABLE>';
  showA.innerHTML=str;
}
</SCRIPT>
<DIV id=showA>°á°ú Ç¥½Ãâ</DIV>
<BUTTON onclick = "fnFindSpecified(this)">BUTTON ¼Ó¼º º¸±â</BUTTON>
<SPAN onclick = "fnFindSpecified(this)" class=clickBox>SPAN ¼Ó¼º º¸±â</SPAN>
<SUP onclick = "fnFindSpecified(this)" class=clickBox>SUP ¼Ó¼º º¸±â</SUP>
<DIV onclick = "fnFindSpecified(this)" class=clickBox>DIV ¼Ó¼º º¸±â</DIV>