ExampleExecute a JavaScript when releasing a mouse button over a paragraph: |
Browser Support |
1. Definition and Usage
The onmouseup attribute fires when a mouse button is released over the element.
Tip: The order of events related to the onmouseup event (for the left/middle mouse button):
- onmousedown
- onmouseup
- onclick
The order of events related to the onmouseup event (for the right mouse button):
- onmousedown
- onmouseup
- oncontextmenu
Note: The onmouseup attribute CANNOT be used with: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>.
2. Differences Between HTML 4.01 and HTML5
None.
3. Syntax
1 |
< element onmouseup = "script" > |
4. Attribute Values
Value | Description |
---|---|
script | The script to be run on onmouseup |