This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

HTMLElement: pointerover event

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨июль 2020 г.⁩.

Событие pointerover когда указатель входит в границы элемента обрабатываемого события.

Bubbles Yes
Cancelable Yes
Interface PointerEvent
Event handler property onpointerover

Примеры

С использованием addEventListener():

js
const para = document.querySelector("p");

para.addEventListener("pointerover", (event) => {
  console.log("Pointer moved in");
});

С использованием свойство элемента onpointerover :

js
const para = document.querySelector("p");

para.onpointerover = (event) => {
  console.log("Pointer moved in");
};

Спецификации

Specification
Pointer Events
# the-pointerover-event
Pointer Events
# dom-globaleventhandlers-onpointerover

Совместимость с браузерами

Смотрите также