Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

onpropertychange event

Fires when a property changes on the object.

Note  The HTMLLabelEvents2::onpropertychange event is only supported in conjunction with the legacy IHTMLElement2::attachEvent IE-only event registration model, which has deprecated since Windows Internet Explorer 9 in favor of the W3C standard "IEventTarget::addEventListener" event model.

Syntax

HTML Attribute <element onpropertychange = "handler(event)">
Event Property object.onpropertychange = handler;
attachEvent Method object.attachEvent("onpropertychange", handler)
addEventListener Method object.addEventListener("propertychange", handler, useCapture)

Event information

SynchronousNo
BubblesNo
CancelableNo

Event handler parameters

pEvtObj [in]

Type: IHTMLEventObj

Standards information

There are no standards that apply here.

Remarks

The HTMLLabelEvents2::onpropertychange event fires when properties of an object, IHTMLDocument2::expando, or style sub-object change. To retrieve the name of the changed property, use the event object's IHTMLEventObj2::propertyName property. This property returns a read-only string of the name of the property that has changed. In the case of Cascading Style Sheets (CSS) properties, the property name is prefixed with style. For example, if the CSS property IHTMLStyle::pixelLeft is altered, the value of window.event.propertyName is style.left. By contrast, if the non-CSS property IHTMLFrameBase::name is altered, the value of window.event.propertyName is name.

When the HTMLLabelEvents2::onpropertychange event fires, the IHTMLEventObj::srcElement property of the event object is set to the object whose property has changed.

Note  Changing the IHTMLElement::innerText or IHTMLElement::innerHTML of child elements will not cause the HTMLLabelEvents2::onpropertychange event to fire for the parent element.

Sends notification when a property changes.

To invoke this event, do one of the following:

  • Cause a property to change value.

The pEvtObj parameter is required for the following interfaces:

See also

Reference
IHTMLEventObj2::propertyName
IHTMLEventObj::srcElement

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.