 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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 −

Advertisements
 