HTML event onmouseover

From Htmlpedia
Jump to: navigation, search

Event Attribute onMouseOver

onMouseOver is an event attribute, it takes JavaScript-code as a value. The code will be executed when:

  • The user starts hovering above the element

It stays at its current action even when the user hovers out of the element.


In this example, the color of the span text will change to red after the user starts hovering above it.

<span onmouseover="'#FF0000';">Place your cursor on top of me</span>


onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup