Javascript getElementFromPoint(x,y)-什么?

Javascript getElementFromPoint(x,y)-什么?,javascript,jquery,Javascript,Jquery,我以前肯定用过这段代码,但这次它抛出了一个错误 我的代码: $(document).click(function (e) { var getPoint = document.getElementFromPoint(e.pageX,e.pageY); alert(getPoint); }); 我得到以下错误: document.getElementFromPoint is not a function 在Firefox中,此函数称为document.elementFromPoint()

我以前肯定用过这段代码,但这次它抛出了一个错误

我的代码:

$(document).click(function (e) {
  var getPoint = document.getElementFromPoint(e.pageX,e.pageY);
  alert(getPoint);
});
我得到以下错误

document.getElementFromPoint is not a function

在Firefox中,此函数称为document.elementFromPoint()


我已将方法从:getElementFromPoint更改为:elementFromPoint,并且在IE8和最新的firefox中运行良好