Event.stopPropagation() (Method)

Prevents propagation of event handling via bubbling or capture techniques.

Availability:

DOM level - 2
JavaScript - 1.5
Netscape - 6.0
Opera - 5.0
JavaScript syntax:NmyEvent.stopPropagation()

This is similar to event cancelling, but defers that cancellation until the end of the current handler. Any pending dispatches to the current EventTarget will be honored however.

Propagation of events to any parent node when bubbling is used or child nodes when event capturing is used will be inhibited.