appendChild
The appendChild method inserts the specified node into the list of nodes on the current document.
Syntax
element.appendChild(newChild)
Parameters
Example
// puts the new, empty paragraph at the end // of the document p = document.createElement("p"); element.appendChild(p);
Notes
appendChild is one of the fundamental methods of web programming using the DOM. The appendChild method inserts a new node into the DOM structure of the HTML document, and is the second part of the one-two, create-and-append process so central to building web pages programmatically. The example above illustrates this basic process.
Specification
appendChild
Netscape Communications http://developer.netscape.com |