event Properties DHTML Events
Returns the name of the property that has changed on the object.
HTML |
N/A |
Script |
[ sProperty = ] event.propertyName |
sProperty |
Name of the property that changed value during the event. |
The property is read-only with no default value.
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.
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
event
onpropertychange