'elementFromPoint()' Example : elementFromPoint « Javascript Methods « JavaScript Reference

'elementFromPoint()' Example

    
<html>
<body>
<script language="JavaScript">
function function1() {
    var m = document.elementFromPoint(150, 150);
    var n = m.tagName;
    alert("The element located at point (150, 150) is "+n); 
}
</script>
<button onclick="function1();">Click to reveal element</button>
</body>
</html>

    
      
      








Related examples in the same category

1.'elementFromPoint()' Syntax, Parameters and Note
2.'elementFromPoint()' is applied to