Home Web Front-end HTML Tutorial The event attribute onmouseup triggered when the mouse button is released in html

The event attribute onmouseup triggered when the mouse button is released in html

Nov 06, 2017 am 11:32 AM
html button trigger

Example

Execute JavaScript when releasing the mouse button on the paragraph:

<p onmouseup="mouseUp()">Click the text!</p>
Copy after login

Browser support


IE

Firefox

Chrome

Safari

Opera


All major browsers support the onmouseup attribute.

Definition and Usage

The onmouseup attribute is triggered when the mouse button is released.

Tip: Event order relative to onmouseup event (limited to left/middle mouse button):

  1. onmousedown

  2. onmouseup

  3. onclick

The event sequence of the onmouseup event (limited to the right mouse button):

  1. onmousedown

  2. onmouseup

  3. oncontextmenu

Note: The onmouseup attribute does not apply to the following elements: ,
, , ,