¾ÖÆ®¸®ºäÆ®°ªÀÌ ÁöÁ¤µÇ¾ú´ÂÁö¸¦ ºÎ¿ï°ªÀ¸·Î ¹ÝȯÇÑ´Ù.
true | ¾ÖÆ®¸®ºäÆ®°¡ ÁöÁ¤µÇ¾ú´Ù. |
false | ¾ÖÆ®¸®ºäÆ®°¡ ÁöÁ¤µÇÁö ¾Ê¾Ò´Ù. |
ÀÌ ¼Ó¼ºÀº ÀбâÀü¿ëÀÌ¸ç µðÆúÆ®°ªÀº ¾ø´Ù.
¾ÖÆ®¸®ºäÆ®´Â HTML À̳ª ½ºÅ©¸³Æ®¸¦ ÅëÇÏ¿© ÁöÁ¤ÇÒ ¼ö ÀÖ´Ù.
°³Ã¼ | script | HTML | ±Ô°Ý | IE |
---|
ÀÌ ¼Ó¼ºÀº (¿µ¹®) W3C DOM Level 1(Document Object Model)¿¡¼ Á¤ÀǵǾú´Ù.
°³Ã¼¿¡ ¼³Á¤µÈ ¾ÖÆ®¸®ºäÆ®¸¦ ¾Ë±â À§ÇÏ¿© 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>