| |

VerySource

 Forgot password?
 Register
Search
View: 763|Reply: 2

How to locate the element based on the current coordinates of the mouse?

[Copy link]

2

Threads

7

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-7 09:50:01
| Show all posts |Read mode
As the question seems, there is such a method.
Reply

Use magic Report

0

Threads

9

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-1-7 21:18:01
| Show all posts
Put another way
Instead, use the element's onmouseover event to determine if the mouse is over the element
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-16 16:09:01
| Show all posts
elementFromPoint

oElement = document. elementFromPoint (iX, iY)

Gets the object oElement based on the ordinate values ​​iX and iY. oElement must support and respond to mouse events.
The coordinates provided are client area coordinates. The upper left corner of the client area is (0,0).
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list