Skip to content
Advertisements

Category: javascript lessons

hasAttribute

DOM hasAttribute ()

The hasAttribute () method returns true if the specified attribute exists, otherwise false.

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.