JavaScript – DOM Element contains() Method
The Element contains() method returns “true” if a node is a descendant of a node, and returns “false” if it’s not.
The Element contains() method returns “true” if a node is a descendant of a node, and returns “false” if it’s not.
The Element contentEditable property sets or returns if the content of an element is editable.
The Element dir property sets or returns an elements’s dir attribute, which specifies the text-direction.
The Element focus() method gives focus to an element if it can receive focus.
The Element firstChild property returns the first child node of a node.
The Element firstElementChild property returns the first child element of the specified element.
The Element getAttribute() method returns the value of an element’s attribute.
The Element getAttributeNode() method returns an element’s attribute.
The Element getBoundingClientRect() method returns the size of an element, and its position relative to the viewport.
The Element getElementsByClassName() method returns a collection of child elements with a given class name.
The Element getElementsByClassName() method returns a collection of child elements with a given tag name.
The Element hasAttribute() method returns “true” if the attribute exists, and “false” if it does not exist.
The Element hasAttributes() method returns “true” if a node has attributes, and “false” if it does not.
The Element hasChildNodes() method returns “true” if the specified node has any child nodes, and “false” if it does not have any child nodes.
The Element id property sets or returns the value of an element’s id attribute.
The Element innerHTML property sets or returns the HTML content of an element.
The Element innerText property sets or returns the text content of an element.
The Element insertAdjacentElement() method inserts an element into a specified position.
The Element insertAdjacentHTML() method inserts HTML code into a specified position.
The Element insertAdjacentText() method inserts text into a specified position.