I volontari di MDN non hanno ancora tradotto questo articolo in Italiano. Unisciti a noi e traducilo tu stesso.
Puoi anche consultare l’articolo in English (US).

An event handler for close events sent to the window. (Not available with Firefox 2 or Safari)

Syntax

window.onclose = funcRef;

Parameters

  • funcRef is a reference to a function.

Example

window.onclose = resetThatServerThing;

Specifications

Specification Status Comment
HTML Living Standard
The definition of 'onclose' in that specification.
Living Standard  

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support YesEdge ? Firefox Full support YesIE ? Opera ? Safari No support NoWebView Android Full support YesChrome Android Full support YesEdge Mobile ? Firefox Android Full support YesOpera Android ? Safari iOS No support NoSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

Tag del documento e collaboratori

Hanno collaborato alla realizzazione di questa pagina: fscholz, jpmedley, cvrebert, Sebastianz, teoli, SphinxKnight, kscarfone, Sheppy, Djc8080, alecananian
Ultima modifica di: fscholz,