Latest web development tutorials

cancelable event properties

Event Object Reference Event objects

Definition and Usage

cancelable event returns a Boolean value. If preventDefault () method to cancel the default action associated with the event, true, or it is fasle.

grammar

event .cancelable

Examples

Examples

The following example will detect event occurs whether a cancelable event:

<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Script>
function myFunction (e) {
alert (e.cancelable);
}
</ Script>
</ Head>
<Body>

<P onclick = "myFunction (event)"> Click this paragraph, if the event is canceled will pop up a warning box. </ P>

</ Body>
</ Html>

try it"


Event Object Reference Event objects