Windows apps
Collapse the table of content
Expand the table of content

wheelDelta property

Retrieves the distance and direction the wheel button has rolled.



p = object.wheelDelta

Property values

Type: Integer

the distance and direction that the wheel button has rolled.


This property indicates the distance that the wheel has rotated, expressed in multiples of 120. A positive value indicates that the wheel has rotated away from the user. A negative value indicates that the wheel has rotated toward the user.

This property is used with the onmousewheel event.


The following example shows how to use the wheelDelta with the onmousewheel event to measure the distance the wheel button has rotated. Measurement values of wheelDelta are in multiples of 120.

function updateDelta(){
<DIV onmousewheel="updateDelta()">Place cursor over this sentence and roll! wheelDelta: 
(<SPAN ID="oNotice"></SPAN>)



Build date: 11/26/2012

© 2016 Microsoft