JavaScript Reference/Javascript Properties/wheelDelta

Материал из Web эксперт
Перейти к: навигация, поиск

"wheelDelta" Example

    
<html>
<body>
<p>
Move mouse wheel on top of the image</p>
<img id="yourimage" 
     src="http://www.wbex.ru/style/logo.png" 
     onmousewheel="alert("Wheel Delta: " + event.wheelDelta);">
</body>
</html>



"wheelDelta" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |event                                                         |
+----------------+--------------------------------------------------------------+



"wheelDelta" Syntax and Note

Note:
Read-only property. 
Returns a value of 
   120  if the mouse wheel is rotated up 
   -120 if it is rotated down.
    
Syntax:
    
window.event.wheelDelta