DOM

Contents
      1. Retrieving Nodes
      2. Properties
      3. Modification
        1. Creation
        2. Insertion/Removal
Some central JavaScript Document Object Model API methods.

Retrieving Nodes

 document.getElementById(id)
 document.getElementsByName(name)
 node.getElementsByTagName(tagName)
 getElementsByClassName(className)
 .querySelector(css)
 .querySelectorAll(css)
 document.evaluate(xpath, context, null, XPath.Result.???, null);
 node.nextSibling
     .previousSibling
     .lastChild
     .firstChild
     .childNodes .children (?)
     .parentNode

Properties

 node.className
     .style
     .currentStyle (IE)
 document.defaultView().
    getComputedStyle(node, "").
    getPropertyValue(stylename);

Modification

Creation

 document.createElement(tagName)
 document.createTextNode(text)
 node.cloneNode(true)

Insertion/Removal

 node.appendChild(new)
 node.insertBefore(new, sibling)
 node.replaceChild(new, old)
 node.removeChild(old)

EditContents