Only the most used. Full list
document.body
document.title
get/set title of the page
document.location
Document.getElementsByClassName()
get a list of elements with the given class name.
Document.getElementsByTagName()
get a list of elements with the given tag name.
document.getElementById(String id)
get an object reference to the identified element
Document.createElement()
Creates a new element with the given tag name.
// create a new div element
// and give it some content
var newDiv = document.createElement("div");
var newContent = document.createTextNode("Hi there and greetings!");
newDiv.appendChild(newContent); //add the text node to the newly created div.
// add the newly created element and its content into the DOM
var currentDiv = document.getElementById("div1");
document.body.insertBefore(newDiv, currentDiv);
document.querySelector(String CSS selector)
get the first Element node within the document, in document order, that matches the specified selectors.
document.querySelectorAll(String CSS Selector)
Returns a list of all the Element nodes within the document that match the specified selectors. CSS Selectors
document.querySelectorAll("a[class*='item']");
document.querySelector("div.user-panel.main input[name=login]");
Document.createAttribute()
Creates a new Attr object and returns it.
var node = document.getElementById("div1");
var a = document.createAttribute("my_attrib");
a.value = "newVal";
node.setAttributeNode(a);
console.log(node.getAttribute("my_attrib")); // "newVal"