Event Bubbling Sample

The following sample demonstrates event bubbling in Dynamic HTML.

The DIV object, identified by the red background, defines an onmouseover event that reports the ID of the object that the mouse enters. Since the IMG object is inside the DIV, event bubbling sends any onmouseover events from the image to the event handler on the DIV object.

This is a text node inside the DIV.

This text is inside a P element.

Cone



[Right-click and choose View Source from the shortcut menu.]

© 2007 Microsoft Corporation. All rights reserved. Terms of use.