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).

The onmouseout property of the GlobalEventHandlers mixin is an EventHandler that processes mouseout events.

The mouseout event fires when the mouse leaves an element. For example, when the mouse moves off of an image in the web page, the mouseout event is raised for that image element.


element.onmouseout = function;


This example adds an onmouseout and an onmouseover event to a paragraph. Try moving your mouse over and out of the element.


<p>Test your mouse on me!</p>


const p = document.querySelector('p');
p.onmouseover = logMouseOver;
p.onmouseout = logMouseOut;

function logMouseOver() {
  p.innerHTML = 'MOUSE OVER detected';

function logMouseOut() {
  p.innerHTML = 'MOUSE OUT detected';



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

Browser compatibility

Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support YesEdge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes


Full support  
Full support

Tag del documento e collaboratori

Hanno collaborato alla realizzazione di questa pagina: mfluehr, fscholz, ttbarnes, erikadoyle, jpmedley, robatron, cvrebert, teoli, MHasan, pedrocarvalho, kscarfone, Sheppy, ziyunfei, cydelic, Mgjbot, Dria, JesseW
Ultima modifica di: mfluehr,