如何在jQuery / Javascript中逐个获取 [英] How to get element by point in jQuery/Javascript

查看:69
本文介绍了如何在jQuery / Javascript中逐个获取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过指定页面中的点值来获取元素。

I want to get an element by specifying the point values in page.

var point = this.svgRenderer.getPoint(serPoint, chart);

这将返回页面的确切点位置。该点包含一些SVG元素,可以是圆形或矩形,也可以是图像或其他元素。我想根据点位置获取元素。这可能吗?

This will return exact point location of the page. That point contains some SVG element either circle or rectangle or image or other elements. I want to get the element based on the point location. Is this possible?

推荐答案

document.elementFromPoint(x, y);

https://developer.mozilla.org/en-US/docs/DOM/document.elementFromPoint

这篇关于如何在jQuery / Javascript中逐个获取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆