Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

I volontari di MDN non hanno ancora tradotto questo articolo in Italiano. Registrati per tradurlo tu.

Summary

Returns a boolean indicating whether or not event.preventDefault() was called on the event.

Note: You should use this instead of the non-standard, deprecated getPreventDefault() method (see bug 691151).

Syntax

bool = event.defaultPrevented 

Example

 if (e.defaultPrevented) {
   /* the default was prevented */
 }

Specifications

Specification Status Comment
DOM
The definition of 'Event.defaultPrevented()' in that specification.
Living Standard  
DOM4
The definition of 'Event.defaultPrevented' in that specification.
Working Draft Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 18 6.0 (6.0) 9.0 11.0 5.0
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? 6.0 (6.0) ? ? 5.0

Tag del documento e collaboratori

 Hanno collaborato alla realizzazione di questa pagina: cvrebert, Jeremie, fscholz, teoli, afreen, kscarfone, Cobra, Sheppy, airportyh, pamelafox, ziyunfei, Jürgen Jeka
 Ultima modifica di: cvrebert,