Answers for "getelementbyxpath"

1

getelementbyxpath

function getElementByXpath(path) {
  return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}

// *** use *** 
// getElementByXpath(XpathTargetingDOMNode)
Posted by: Guest on December-27-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language