User Tools

Site Tools


own_js_code

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

own_js_code [2013/10/07 10:48] – created ginkoown_js_code [2013/10/07 10:50] (current) – [XPath] ginko
Line 1: Line 1:
 ====== Own JS code ====== ====== Own JS code ======
 ===== XPath ===== ===== XPath =====
-Récupérer des uds DOM via une XPath :+Récupérer *un* ud DOM via une XPath :
 <code javascript>function getNode(xpathStmt, node) { <code javascript>function getNode(xpathStmt, node) {
  return document.evaluate( xpathStmt, node, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null ).singleNodeValue;  return document.evaluate( xpathStmt, node, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null ).singleNodeValue;
 } }
 </code> </code>
own_js_code.txt · Last modified: 2013/10/07 10:50 by ginko