propertyName Property

Internet Development Index

Sets or retrieves the name of the property that changes on the object.

Syntax

event.propertyName [ = sProperty ]

Possible Values

sPropertyString that specifies or receives the name of the property whose value changes during the event.

The property is read/write. The property has no default value.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.

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.

<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>
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

There is no public standard that applies to this property.

Applies To

event

See Also

onpropertychange