Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
elementFromPoint
go
Collapse the table of content
Expand the table of content

elementFromPoint method

Returns the element for the specified x coordinate and the specified y coordinate.

Syntax

var retval = document.elementFromPoint(x, y);

Parameters

x [in]

Type: Integer

A Integer that specifies the X-offset, in pixels.

y [in]

Type: Integer

A Integer that specifies the Y-offset, in pixels.

Return value

Type: IHTMLElement

Returns an element object.

Standards information

There are no standards that apply here.

Remarks

Coordinates are supplied in client coordinates. The upper-left corner of the client area is (0,0). For elementFromPoint to exhibit expected behavior, the object or element located at position (x, y) must support and respond to mouse events.

See also

document
Reference
clientX
clientY

 

 

Show:
© 2015 Microsoft