Name
layerX, layerY — NN 4 IE n/a DOM n/a
Synopsis
Read-only
The horizontal (x) and vertical (y) coordinate of the mouse at the
moment the current event fired. These coordinates are relative to the
containing layer. If no layers or positionable elements have been
defined, the default layer of the base document is used as a
reference point, thus being equivalent to the
pageX
and pageY
properties.
Example
if ((evtObj.layerX >= 10 || evtObj.layerX <= 20) &&
(evtObj.layerY >= 50 || evtObj.layerY <= 100)) {
process code for click in hot zone bounded by 10,50 and 20,100
}
Value
Integer of pixel values.
Default
None.
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.