X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

cancelable Event Property

Event Object Reference 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

event.cancelable
 

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 Reference Event Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook