onmouseout event
The onmouseout event activates when the mouse is moved off an element. Â The event can be specified as a JavaScript expression or the name of a JavaScript function. Â
If an expression is used, the JavaScript keyword this refers to the element. Â
If the name of a function is used, the function will receive 2 parameters when called:Â
The browser event object; this object can be used to determine the mouse coordinates
A reference to the element
Example:
The following example highlights an element in yellow when the user hovers the mouse over it.
onmouseover:Â this.style.backgroundColor = "yellow";
onmouseout:Â this.style.backgroundColor = "";