cancelable Event Property
Event Object
Definition and Usage
The cancelable event property returns whether or not the event is a cancelable
event.
The event is cancelable if it is possible to prevent the events default
action.
Syntax
Example
Example
The following example checks if the triggered event is a cancelable event:
<html>
<head>
<script>
function myFunction(e)
{
alert(e.cancelable);
}
</script>
</head>
<body>
<p
onclick="myFunction(event)">Click this paragraph.
An alert box will tell if the
event is a cancelable event.</p>
</body>
</html>
Try it yourself »
Event Object
Thank You For Helping Us!
Your message has been sent to W3Schools.
Close [X]