cancelable event properties
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>
<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 objects