javascript event layerX, layerY
| layerX, layerY | NN 4 IE n/a DOM n/a |
| Read-only | |
|
Provide 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 equivalent to the pageX and pageY properties. In Netscape 6 and later, these properties are measured relative to the element's own rectangular space for text and password input elements, textarea elements, and select elements. |
|
| Example | |
if ((evt.layerX >= 10 && evt.layerX <= 20) &&
(evt.layerY >= 50 && evt.layerY <= 100)) {
// process code for click in hot zone bounded by 10,50 and 20,100
}
|
|
| Value | |
Integer of pixel values. |
|
| Default | |
None |
|
Previous: javascript event metaKey
Next: javascript event keyCode
764,Nickname,Homepage or email,Comments here,Add comment
