Element Methods Flashcards
getAttribute()
Returns the specified attribute value
getAttributeNode()
Returns the specified attribute node
getBoundingClientRect()
Returns the size of an element and its position relative to the viewport.
getElementsByClassName()
Returns a collection of all child elements with the specified class name
getElementsByTagName()
Returns a collection of all child elements with the specified tagname
hasAttribute()
Returns true if the element has the specified attribute, otherwise it returns false
querySelector()
Returns the first element that is a descendant of the element on which it is invoked that matches the specified CSS selector
querySelectorAll()
Returns a NodeList containing all elements descended from the element on which it is invoked that matches the specified CSS selector
removeAttribute()
Removes the specified attribute
removeAttributeNode()
Removes the specified attribute node, and returns the removed node
setAttribute()
Sets or changes the specified attribute, to the specified value
setAttributeNode()
Sets or changes the specified attribute node