Last updated 2 years ago
Was this helpful?
⟩ ⟩ ⟩ ⟩ ⟩ coords
compare , , of a mouse event.
replit ⟩
const { log } = console // ⭐️ import import { $ } from './js/ext/Node_ext.js'; // Node + ext // -------------------------------------------------------------------- const info = $("#info"); document.onmousemove = (e) => { info.innerHTML = `<ul><li>screen: (${e.screenX}, ${e.screenY})` + `<li>page: (${e.pageX}, ${e.pageY})` + `<li>client: (${e.clientX}, ${e.clientY})</ul>`; };
⟩ ⟩ ⟩
(, ) - relative to whole screen.
(., .) - relative to document.
(., .) - relative to .