HTML onmousewheel Attribute
Deprecated: Not Supported in HTML5.
Example
<div id="demo" onmousewheel="myFunction()">
Meaning
The onmousewheel attribute run when the mouse wheel is rolled up or down over an element.
Note: The onmousewheel attribute is deprecated, you can use the onwheel attribute instead.
Standard Syntax
<element onmousewheel="script">
Browser Support
Status
Applies to:
The onmousewheel attribute can be used on the following element:
Element | Attribute |
---|---|
All HTML elements. | onmousewheel |
Attribute Values
Value | Description |
---|---|
script | Specifies the script to be run on when a mouse wheel is being scrolled over an element. |