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
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 = "";