propertyName Property

DHTML, HTML, & CSS

propertyName Property


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

Syntax

HTMLN/A
Scripting[ sProperty = ] event.propertyName

Possible Values

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

Applies To

[ Object Name ]
PlatformVersion
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

onpropertychange


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.