Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

76
Views
Is there a way to get xpath of an element using javascript

I need a functionality that find xpath of an element when I click on it.

document.addEventListener("click", e => {
    let xpath = e.target // I want to find the xpath of this element
})

I searched on Google but I could find anything related to mine. Can anyone point me in the right direction?

7 months ago ยท Juan Pablo Isaza
Answer question
Find remote jobs