gpt4 book ai didi

javascript - 获取 ElementFromPoint(x,y) - whaaaat?

转载 作者:搜寻专家 更新时间:2023-11-01 05:02:46 25 4
gpt4 key购买 nike

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

我的代码:

$(document).click(function (e) {
var getPoint = document.getElementFromPoint(e.pageX,e.pageY);
alert(getPoint);
});

我得到以下错误:

document.getElementFromPoint is not a function

最佳答案

在 Firefox 中这个函数叫做 document.elementFromPoint()

https://developer.mozilla.org/En/DOM:document.elementFromPoint

关于javascript - 获取 ElementFromPoint(x,y) - whaaaat?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4132233/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com