25.217. Node.removeChild( ): remove (and return) the specified child of this nodeDOM Level 1 Core25.217.1. SynopsisNode removeChild(Node oldChild) tHRows DOMException; 25.217.1.1. Arguments
25.217.1.2. ReturnsThe node that was removed. 25.217.1.3. ThrowsThis method may throw a DOMException with the following code values in the following circumstances:
25.217.2. DescriptionThis method removes the specified child from the childNodes[] array of this node. It is an error to call this method with a node that is not a child. removeChild( ) returns the oldChild node after removing it. oldChild continues to be a valid node and may be reinserted into the document later. 25.217.3. ExampleYou can delete the last child of the document body with this code: document.body.removeChild(document.body.lastChild); 25.217.4. See AlsoNode.appendChild( ), Node.insertBefore( ), Node.replaceChild( ) |