我之前肯定使用过这段代码,但这次它会抛出一个错误.
我的代码:
$(document).click(function (e) {
var getPoint = document.getElementFromPoint(e.pageX,e.pageY);
alert(getPoint);
});
Run Code Online (Sandbox Code Playgroud)
我得到以下错误:
document.getElementFromPoint is not a function
Run Code Online (Sandbox Code Playgroud)
在Firefox中,这个函数叫做document.elementFromPoint()
https://developer.mozilla.org/En/DOM:document.elementFromPoint
| 归档时间: |
|
| 查看次数: |
5067 次 |
| 最近记录: |