propertyName Property
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
[ Object Name ] Platform Version Win16: Win32: Mac: Unix: WinCE: Version data is listed when the mouse hovers over a link, or the link has focus.
HTML N/A Scripting event
See Also
Did you find this topic useful? Suggestions for other topics? write us!
© 1999 microsoft corporation. all rights reserved. terms of use.