XML DOM cancelable event attribute

Definition and Usage

The cancelable event returns a boolean value. If used preventDefault() methodIf the default action associated with the event can be canceled, then it is true, otherwise it is false.

Syntax

event.cancelable

Example

The following example shows how to check if the event that occurs is a cancelable event:

<html>
<head>
<script type="text/javascript">
function isEventCancelable(event)
  { 
  alert(event.cancelable);
  }
</script>
</head>
<body onmousedown="isEventCancelable(event)">
<p>Click somewhere in the document. 
An alert box will tell if the 
event is a cancelable event.</p>
</body>
</html>

TIY

cancelable event
ఇవెంట్ అనేకంటే క్యాన్సెల్‌బల్ ఇవెంట్ అని పరిశీలించండి (IE బ్రౌజర్ మద్దతు లేదు).