asp.net.ph

Skip Navigation Links

propertyName Property

event Properties   DHTML Events


Returns the name of the property that has changed on the object.

Syntax


HTML N/A
Script [ sProperty = ] event.propertyName

Possible Values


sProperty Name of the property that changed value during the event.

The property is read-only with no default value.

Remarks

This property is equivalent to the generic attrName property as specified in the DOM Level 2 Event Model, which indicates the name of the changed Attribute node in a DOMAttrModified event.

This property of the event object is intended for use in conjunction with the onpropertychange event.

Example

The example illustrates how to use the propertyName property with the onpropertychange event.

<head>
<script language="JavaScript">
function chgProp ( ) {
btnProp.value = "This is the new VALUE";
}
function chgCSSProp ( ) {
btnStyleProp.style.backgroundColor = "navy";
btnStyleProp.style.color = "lime";
}
</script>
</head>

<body>
...
<input type=button id="btnProp"
  onclick="chgProp ( )"
  value="Change the VALUE of this button"
  onpropertychange='alert ( event.propertyName + 
  " property has changed" ) '>
<p>
<input type=button id="btnStyleProp"
  onclick="chgCSSProp ( )"
  value="Change the colors of this button"
  onpropertychange='alert ( event.propertyName + 
  " property has changed" ) '>

This feature requires Microsoft® Internet Explorer® 5 or later.

 Show me 

Applies To

event

See Also

onpropertychange



>

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note