Retrieves the name of the property that has changed on the object.
Syntax
HTML N/A Scripting [ sProperty = ] event.propertyName
Possible Values
sProperty String that specifies the name of the property whose value changed during the event. The property is read-only with no default value.
Remarks
You can alter the value of propertyName by using it with the onpropertychange event.
Example
This example uses the onpropertychange event to change the value of the propertyName property.
Sample Code
<HEAD> <SCRIPT> function changeProp() { btnProp.value = "This is the new VALUE"; } function changeCSSProp() { btnStyleProp.style.backgroundColor = "aqua"; } </SCRIPT> </HEAD> <BODY> <P>The event object property propertyName is used here to return which property has been altered.</P> <INPUT TYPE=button ID=btnProp onclick="changeProp()" VALUE="Click to change the VALUE property of this button" onpropertychange='alert(event.propertyName + " property has changed value")'> <INPUT TYPE=button ID=btnStyleProp onclick="changeCSSProp()" VALUE="Click to change the CSS backgroundColor property of this button" onpropertychange='alert(event.propertyName + " property has changed value")'> </BODY>
Applies To
HTML N/A Scripting event
See Also