
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
HTML cancelable Event Property
The cancelable event property in HTML checks whether an event is a cancelable event or not. The values include TRUE if it is a cancelable event, else FALSE is returned.
Following is the syntax −
event.cancelable
Let us now see an example to implement the cancelable event property −
Example
<!DOCTYPE html> <html> <body> <h2>Checking cancelable event</h2> <p>The below button will display whether the event is cancelable or not.</p> <button onclick="myFunction(event)">Click me</button> <p id="myid"></p> <script> function myFunction(event) { var val = event.cancelable; document.getElementById("myid").innerHTML = val; } </script> </body> </html>
Output
Now, click on the button to display whether the event is cancelable or not. A boolean value would be returned −
- Related Articles
- HTML DOM cancelable Event Property
- HTML returnValue Event Property
- HTML isTrusted Event Property
- HTML view Event Property
- HTML currentTarget Event Property
- HTML defaultPrevented Event Property
- HTML DOM timeStamp Event Property
- HTML DOM Event type Property
- HTML onblur Event Attribute
- HTML onclick Event Attribute
- HTML onchange Event Attribute
- HTML oncopy Event Attribute
- HTML oncut Event Attribute
- HTML oncontextmenu Event Attribute
- HTML ondrag Event Attribute

Advertisements