Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

348
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda