Javascript examples for DOM:Event
The cancelable event property indicates if an event is a cancelable event.
A Boolean, indicating if the event is a cancelable event.
The following code shows how to find out if a specific event isCancelable
<!DOCTYPE html> <html> <body> <button onclick="myFunction(event)">Test</button> <p id="demo"></p> <script> function myFunction(event) {/*w ww .j av a 2 s . c o m*/ var x = event.cancelable; document.getElementById("demo").innerHTML = x; } </script> </body> </html>