Javascript gets the sample code for the mouse click element object of
- 2020-03-30 01:00:03
- OfStack
IE:
Var obj = document. ElementFromPoint (event. ClientX, event. ClientY);
Get object text
Var a = obj. The innerText
FF requires adding an object to the event to read the coordinates.
HTML:
The onclick = "gj (event)"
JS:
function gj(event){
var b=obj
obj=document.elementFromPoint(event.clientX,event.clientY);
}