onpropertychange event
[This documentation is preliminary and is subject to change.]
Fires when a property changes on the object.
Syntax
HTML Attribute | <element onpropertychange = "handler(event)"> |
Event Property | object.onpropertychange = handler; |
attachEvent Method | object.attachEvent("onpropertychange", handler) |
Standards information
There are no standards that apply here.
Event information
Synchronous | No |
Bubbles | No |
Cancelable | No |
Event handler parameters
- pEvtObj [in]
Type: IHTMLEventObj
Remarks
The onpropertychange event fires when properties of an object, expando, or style sub-object change. To retrieve the name of the changed property, use the event object's 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 pixelLeft is altered, the value of window.event.propertyName
is style.left. By contrast, if the non-CSS property name is altered, the value of window.event.propertyName
is name.
When the onpropertychange event fires, the srcElement property of the event object is set to the object whose property has changed.
Note Changing the innerText or innerHTML of child elements will not cause the 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:
- HTMLAnchorEvents2
- HTMLAreaEvents2
- HTMLButtonElementEvents2
- HTMLControlElementEvents2
- HTMLDocumentEvents2
- HTMLElementEvents2
- HTMLFormElementEvents2
- HTMLImgEvents2
- HTMLFrameSiteEvents2
- HTMLInputFileElementEvents2
- HTMLInputImageEvents2
- HTMLInputTextElementEvents2
- HTMLLabelEvents2
- HTMLLinkElementEvents2
- HTMLMapEvents2
- HTMLMarqueeElementEvents2
- HTMLObjectElementEvents2
- HTMLOptionButtonElementEvents2
- HTMLScriptEvents2
- HTMLSelectElementEvents2
- HTMLStyleElementEvents2
- HTMLTableEvents2
- HTMLTextContainerEvents2
- HTMLWindowEvents2
See also
Reference
Build date: 1/23/2012