Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

345
Views
How can I get dom‘s screen position not the browser client position?

just like that the screen is 1920*1080 then the browser is at position 100,100 then the dom is at postion 100,100 of the browser so how can i get the dom's position of screen maybe 202,400 since the browser has border and title,so the dom's screen position is lager than 100+100 such as left is 100+100+2(border) 100+100+200(title of browser) so how can I get the dom's screen position by js here is the example picture example picture

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use the screenX and screenY properties of a mouse event.

document.addEventListener('mousemove', (event) => console.log("Screen position (x,y): (" + event.screenX + ", " + event.screenY + ")"));
Move the mouse here and check console output.

See here for the details https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/screenX

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!