HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

preventDefault

Description

The preventDefault of Event for JS if invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.

Syntax

event.preventDefault()

Examples

1 · dispatch · false

2 · dispatch · true

3 · button · false

4 · button · false

5 · button · true

6 · input · false

7 · input · false

8 · input · true