JavaScript – DOM Element addEventListener() Method
The Element addEventListener() method attaches an event handler to an element.
The Element addEventListener() method attaches an event handler to an element.
The Element appendChild() method appends an element as the last child of a parent element.
The Element attributes property returns a collection of attributes in an element.
The Element childElementCount property returns the number of child elements of an element.
The Element childNodes property returns a list of an elements’s child nodes.
The Element children property returns a list of an element’s child elements.
The Element classList property returns the CSS classnames of an element.
The Element className property sets or returns an element’s class attribute.
The Element click() method simulates a mouse-click on an element.
The Element clientHeight property returns the viewable height of an element, including padding, but not the border, scrollbar or margin.
The Element clientLeft property returns the width of the element’s left border not including the element’s left padding or left margin.
The Element clientTop property returns the width of the element’s top border not including the element’s top padding or top margin.
The Element clientWidth property returns the viewable width of an element, including padding, but not the border, scrollbar or margin.
The Element cloneNode() method creates a copy of a node (and all its attributes and their values), and returns the clone.
The Element closest() method searches up the DOM tree (the element and then its ancestors) for elements which matches a specified CSS selector.
The Element compareDocumentPosition() method compares two nodes, and returns an integer describing where they are positioned in the document.
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.