--- title: WheelEvent.deltaY slug: Web/API/WheelEvent/deltaY translation_of: Web/API/WheelEvent/deltaY ---
{{APIRef("DOM Events")}}
WheelEvent.deltaY
只读属性是一个 double
类型值, 声明垂直滚动量以WheelEvent.deltaMode
为单位.
var dY = event.deltaY;
var syntheticEvent = new WheelEvent("syntheticWheel", {"deltaY": 4, "deltaMode": 0}); console.log(syntheticEvent.deltaY);
Specification | Status | Comment |
---|---|---|
{{SpecName('DOM3 Events','#widl-WheelEvent-deltaY','WheelEvent.deltaY')}} | {{Spec2('DOM3 Events')}} | Initial definition. |