event.screenY

JavaScript 1.2+, JScript 3.0+ Nav4+, IE 4+ Syntax

							event.screenY

Description

The screenY property of the Event object controls the vertical (y-coordinate) positioning within the computer screen in which the event occurred.

Example

Listing 7.212 shows an example of how to determine the y-coordinate of the cursor positioning relative to the computer screen when the click event occurs. The code captures the CLICK event. When captured, control is passed to the handle() function, which determines the y-coordinate position using the screenY property.

Listing 7.212 Accessing the screenY Property of the Event Object
 <html> <head> <title>Example of the event.screenY property</title> </head> <body> <script language = "JavaScript"> ...

Get Pure JavaScript 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.