Easy Tutorial
❮ Prop Style Bordertoprightradius Jsref Concat String ❯

cancelable Event Property


Definition and Usage

The cancelable event returns a Boolean value. It is true if the default action associated with the event can be canceled using the preventDefault() method, otherwise it is false.

Syntax


Example

Example

The following example checks if the occurring event is a cancelable event:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>tutorialpro.org(tutorialpro.org)</title>
<script>
function myFunction(e){ 
    alert(e.cancelable);
}
</script>
</head>
<body>

<p onclick="myFunction(event)">Click this paragraph, and an alert box will pop up if the event is cancelable.</p>

</body>
</html>

❮ Prop Style Bordertoprightradius Jsref Concat String ❯