Skip to content
Related Articles

Related Articles

HTML | DOM WheelEvent deltaZ Property

View Discussion
Improve Article
Save Article
  • Last Updated : 11 Jul, 2022

The HTML | DOM WheelEvent deltaZ Property is used to return a positive double value when the web page is scrolled in and returns a negative value when the page is scrolled out else it returns zero. It is a read-only property. 



Return Value: It returns a double value which indicates the scrolling direction of the mouse wheel. 



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


Before Scroll:


After Scroll:


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

  • Google Chrome 31
  • Edge 12
  • Internet Explorer 9
  • Firefox 17
  • Opera 18
  • Safari 8
My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!