appendChild() adds a node as the last child of a specified parent element in the DOM.
-
The node can be:
-
An element node (
<div>,<p>, etc.) -
A text node
-
-
If the node already exists in the DOM, it is moved, not duplicated.
appendChild() adds a node as the last child of a specified parent element in the DOM.
The node can be:
An element node (<div>, <p>, etc.)
A text node
If the node already exists in the DOM, it is moved, not duplicated.
Previous Article
Next Article