°³Ã¼¿¡¼ ¸ðµç ¾ÖÆ®¸®ºäÆ®¿Í ±× °ªµéÀ» Á¦°ÅÇÑ´Ù.
Àμö/ÆĶó¸ÞÅÍ´Â ¾ø´Ù.
¹Ýȯ°ªÀº ¾ø´Ù.
clearAttributes ¸Þ¼µå´Â »ç¿ëÀÚ°¡ Á¤ÀÇÇÑ HTML ¾ÖÆ®¸®ºäÆ®µéÀ» Á¦°ÅÇÑ´Ù.
id, style, script-only ¼Ó¼ºµéÀº ¿µÇâÀ» ¹ÞÁö ¾Ê´Â´Ù.
°³Ã¼ | script | IE |
---|
tdObj | |
´ÜÃ߸¦ Ŭ¸¯ÇØ º¸¶ó. |
ÀÌ ¿¹Á¦´Â clearAttributes ¸Þ¼µå¸¦ »ç¿ëÇÏ¿© »ç¿ëÀÚ°¡ Á¤ÀÇÇÑ Ãß°¡µÈ attribute1, attribute2, myname ¾ÖÆ®¸®ºäÆ®¸¦ Á¦°ÅÇÏ¿´´Ù.
<SCRIPT>
function fnClear(){ tdObj.clearAttributes(); }
function showAttribs(bb){
leng=tdObj.attributes.length;
str='tdObj.attributes.length='+leng+'<BR>';
for (i=0;i< leng;i++){
// if ((i<10)||(i==40)||(i==73)||(i>(leng-6))) // ¿ä¾à º¸±â
str+=i+']'+tdObj.attributes[i].name+'=<FONT color=blue>'+tdObj.attributes[i].value+'</FONT><BR>';
}
if (bb) showB.innerHTML=str;
else showA.innerHTML=str;
}
</SCRIPT>
<TABLE border=1>
<TR align=center>
<TD id="tdObj" attribute1="true" attribute2="true" myname="trio" onclick="alert('Ŭ¸¯Çß´Ù.');" bgcolor="ffffaa"
onmouseover="this.style.color='#0000FF';" onmouseout="this.style.color='#000000';"><B>tdObj</B></TD>
<TD><INPUT type="button" value="Clear Attributes" onclick="fnClear();showAttribs(1)"></TD>
</TR>
<TR>
<TD id=showA style=white-space:nowrap></TD>
<TD id=showB style=white-space:nowrap>´ÜÃ߸¦ Ŭ¸¯ÇØ º¸¶ó.</TD>
</TR>
</TABLE>
<SCRIPT>showAttribs(0)</SCRIPT>
</DIV>