Advertisement
Home Open Editor ❯

HTML onwheel event Attribute

Example

<div onwheel="myFunction()">Roll the mouse wheel over me!</div>

Try this code ❯

Meaning

The onwheel attribute specifies the script run when the mouse wheel rolls up or down over an element.


Standard Syntax

<element onwheel="script">


Advertisement

Attribute Values

Value Description
script Specifies the script to be run on onwheel

Technical Details

Supported HTML elements:

All HTML elements, EXCEPT: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, and <title>
Home Open Editor ❯
Advertisement