Skip to content
Related Articles

Related Articles

Improve Article

HTML | DOM WheelEvent deltaMode Property

  • Last Updated : 17 Jun, 2019

The DOM WheelEvent deltaMode Property is used to returns a number Which represents the length unit of the scrolling values i.e deltaX, deltaY, deltaZ. It is read only Property.
It returns three numeric value that is:

  • 0:stands for pixels
  • 1: stands for lines
  • 2: stands for pages



Return Value: It returns a numeric value which represents the length unit of the delta values.


<!DOCTYPE html>
      DOM WheelEvent deltaMode Property
<body onwheel="Geeks(event)" 
      style="text-align: center; 
             width: 1000px;">
    <h1 style="color: green;"
        DOM WheelEvent deltaMode Property 
    <p>Scroll to see effect:</p>
    <p id="p"></p>
        function Geeks(event) {
            var doc = event.deltaMode;
              "p").innerHTML = doc;

Before Scroll:

After Scroll:

Supported Browsers: The browsers supported by DOM WheelEvent deltaMode Property are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :