Node Object
The appendChild() method appends a new child node to the end of the list of children of a node.
This method returns the new child node.
| Parameter | Description |
|---|---|
| newchild | The node to append |
The following code fragment loads "books.xml" into xmlDoc using loadXMLDoc() and creates a node (<edition>), and adds it after the last child of the first <book> node:
Output:
appendChild() - Append a child node to all <book> nodes
Node Object
Your message has been sent to W3Schools.