MouseScrollEvent

Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

Giao diện MouseScrollEvent đại diện cho các sự kiện xảy ra do người dùng di chuyển bánh xe chuột hoặc thiết bị đầu vào tương tự.

Warning: Không sử dụng giao diện này cho các sự kiện bánh xe.

Giống như MouseWheelEvent, giao diện này không chuẩn và đã lỗi thời. Nó chỉ được sử dụng trong các trình duyệt dựa trên Gecko. Thay vào đó, hãy sử dụng WheelEvent tiêu chuẩn.

Các thuộc tính

Thuộc tính Kiểu Mô tả
axis Read only long Cho biết hướng cuộn.

Hằng số

Chế độ Delta

Hằng số Giá trị Mô tả
HORIZONTAL_AXIS 0x01 Sự kiện được gây ra bởi thao tác bánh xe ngang.
VERTICAL_AXIS 0x02 Sự kiện được gây ra bởi thao tác bánh xe dọc.

Phương thức phiên bản

initMouseScrollEvent()

Xem nsIDOMMouseScrollEvent::initMouseScrollEvent().

Tương thích trình duyệt

Xem thêm

  • DOMMouseScroll
  • MozMousePixelScroll
  • Đối tượng sự kiện bánh xe chuột được chuẩn hóa: WheelEvent