ExamplePrevent a link from opening the URL, and alert the result from isDefaultPrevented():
Try it yourself » |
The isDefaultPrevented() method returns whether or not the preventDefault() method is called for the specified event object.
event.isDefaultPrevented() |
Parameter | Description |
---|---|
event | Required. Specifies the event to check. The event parameter comes from the event binding function |