X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

cancelable Event Property

Event Object Reference Event Object

Example

Find out if a specific event is cancelable:

alert(event.cancelable);

Try it yourself »


Definition and Usage

The cancelable event property returns a Boolean value indicating whether or not an event is a cancelable event.

The event is cancelable if it is possible to prevent the events default action.

To cancel an event, use the preventDefault() method.


Browser Support

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

Property
cancelable Yes 9.0 Yes Yes Yes


Syntax

event.cancelable

Technical Details

Return Value: A Boolean, indicating whether the specified event is a cancelable event.

Possible values:

  • true - The event is cancelable
  • false - The event is not cancelable
DOM Version: DOM Level 2 Events


Event Object Reference Event Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook