°³Ã¼¿¡¼­ º¯°æµÇ´Â ¼Ó¼ºÀÇ À̸§À» ¹ÝȯÇϰųª ¼³Á¤ÇÑ´Ù.

Àμö
: (¼Ó¼º ¹®ÀÚ¿­)
¼Ó¼º°ªÀº À̺¥Æ®°¡ ¹ß»ýÇÏ¿´À» ¶§ °ªÀÌ º¯ÇÏ´Â ¼Ó¼ºÀÇ À̸§À» ³ªÅ¸³»´Â ¹®ÀÚ¿­ÀÌ´Ù.

ÀÌ ¼Ó¼ºÀº Àбâ/¾²±âÀÌ¸ç µðÆúÆ®°ªÀº ¾ø´Ù.

Ư±â

onpropertychange À̺¥Æ®¿¡¼­ propertyName ¼Ó¼º°ªÀ» º¯°æ½Ãų ¼ö ÀÖ´Ù.

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

°á°ú Ç¥½Ãâ

onpropertychange À̺¥Æ®¸¦ »ç¿ëÇÏ¿© propertyName ¼Ó¼º°ªÀ» º¯°æ½ÃŲ´Ù.

<SCRIPT>
function changeProp(){
    fname.btnProp.value='»õ·Î¿î °ªÀ¸·Î º¯°æµÇ¾ú´Ù';
}
function changeCSSProp(){
  if (fname.btnStyleProp.style.backgroundColor=='yellow') fname.btnStyleProp.style.backgroundColor='lightgreen';
  else fname.btnStyleProp.style.backgroundColor='yellow';
}
</SCRIPT>
<FORM name=fname>
<INPUT type=button id=btnProp onclick="changeProp()"
  value="Ŭ¸¯ÇÏ¿© ¼Ó¼º°ªÀ» º¯°æ"
  onpropertychange="showA.innerHTML=event.propertyName+' ¼Ó¼º°ªÀÌ º¯°æµÇ¾ú´Ù.'">
<INPUT type=button id=btnStyleProp onclick="changeCSSProp()" style="background-color:yellow"
  value="Ŭ¸¯ÇÏ¿© ¹è°æ½ÄÀ» º¯°æ"
  onpropertychange="showA.innerHTML=event.propertyName+' ¼Ó¼º°ªÀÌ º¯°æµÇ¾ú´Ù.'">
</FORM>
<DIV id=showA>°á°ú Ç¥½Ãâ</DIV>