HTML event onmouseup

From Htmlpedia
Jump to: navigation, search

Event Attribute onMouseUp

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

  • The user releases their mouse or pointing device button whilst hovering above the element.

Example

In this example, the user will receive a messagebox saying "You released your mouse button whilst hovering over this text", after releasing the mouse/pointing device button anywhere over the text "Hover over me and click"

<a onmouseup="alert('You released your mouse button whilst hovering over this text')">Hover over me and click</a>

Controversy

As this event requires the user to move the mouse/pointing device and use it's buttons, users with impaired motor skills or no mouse may find this difficult or impossible.

Related

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