stopPropagation() Event Method

Example

Prevent any propagation of the same event:

function func1(event) {
  alert("DIV 1");
  event.stopPropagation();
}
Try it Yourself »

Description

The stopPropagation() method prevents propagation of the same event from being called.

Propagation means bubbling up to parent elements or capturing down to child elements.


Browser Support

The numbers in the table specify the first browser version that fully supports the method.

Method
stopPropagation() Yes 9.0 Yes Yes Yes

Syntax

event.stopPropagation()

Parameters

None

Technical Details

Return Value: No return value
DOM Version: DOM Level 3 Events

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.