elementFromPoint() is a method on "document"object in HTML.
It returns the HTML element at the given X & Y positions.
For Example :-
1) Position a html element say a textarea at (10,10) as follows :-
<textarea style="position:absolute;left:10px;top:10px">
Following script will show aleart as follows:-
var ele = document.elementFromPoint(11,11);
alert(ele)

It returns the HTML element at the given X & Y positions.
For Example :-
1) Position a html element say a textarea at (10,10) as follows :-
<textarea style="position:absolute;left:10px;top:10px">
Following script will show aleart as follows:-
var ele = document.elementFromPoint(11,11);
alert(ele)
No comments:
Post a Comment