JavaScript Event buttons

JavaScript Event buttons

The Buttons property returns a number that indicates which mouse button or mouse buttons are pressed when the mouse event is triggered.

DOM Event currentTarget

DOM Event currentTarget

The CurrentTarget event property returns an event listener that triggers the event when a user clicks a nested item.

replaceChild

DOM replaceChild()

The replaceChild () method replaces a child node of the specified node with another node.

DOM insertbefore()

DOM insertbefore()

The insertBefore () method inserts a node as a child, just in front of an existing child you specify.

DOM appendChild()

DOM appendChild()

The appendChild () method adds a node to the end of the child elements of a specified parent node.

createElement

DOM createElement()

The JavaScript createElement () method creates a node of the specified name. This method is a widely used method.

HTML DOM classList

HTML DOM classList

Adding and deleting classes should be one of the most common tasks for JavaScript and DOM jobs.