July 1998
Intermediate to advanced
1456 pages
65h 5m
English
screenX, screenY — NN 4 IE 4 DOM n/a
Read-only
Horizontal and vertical pixel coordinate points where the cursor was located on the video screen when the event occurred. The top-left corner of the screen is point 0,0. There is no particular coordination with the browser window, unless you have positioned the window and know where the active window area is in relation to the screen.
// NN
if (evtObj.screenX < 5 || evtObj.screenY < 5) {
alert("You\'re too close to the edge!")
}
// IE
if (event.screenX < 5 || event.screenY < 5) {
alert("You\'re too close to the edge!")
}Any positive integer or zero.
None.
Read now
Unlock full access