Sets or retrieves the name of the property that changes on the object.
dhtml语法
event.propertyName [ = sProperty ]
DHTML可能的值
sProperty | String 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.
DHTML代码范例
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.
是否符合公共标准
There is no public standard that applies to this property.
Applies To
更多语法参考
onpropertychange