javascriptBootcamp
- appendChild()
- adds a node to the en dof athe list of children of a spefcific parent node.
- removeChild()
- removes a child node from the DOM
- createElement()
- create the HTML element specified by the tagName
- firstChild
- read-only property returns the nodes first child in the tree
- addEventListener()
- attaches an event handler to the specified element.
- attaches an element without overwriting exsiting event handlers.
- syntax - element.addEventListener(event, function);
- localStorage - returns the length of local storage and its contents as an array
- Methods
- setItem('key','value') - creates an item in local storage from a key value pair, Each key has to be unique
- removeItem() - remove an item by key
- clear() - clears all local storage IE localStorage.clear()
.classname {
// styles go here
}
document.querySelector('.classname')