Javascript Reference
Categories: Node

javascript Node removeChild( )

@March 15, 2008, 1:22 a.m.
removeChild( )Firefox/Netscape/NN 6 IE 5 Chrome/Safari/DOM 1  

removeChild(childNodeReference)

  

Removes a child node from the current element. The parameter must be a reference to an existing child node nested inside the current element. Once removed, the child node is no longer part of the document tree, but is still preserved in memory. The method returns a reference to the removed node so that you may modify it and place it elsewhere in the document tree. Note that you can command one node to remove one of its children, but you cannot command a node to remove itself (but see removeNode( ) for IE).

 
Parameters
 
  • Reference to an existing child node.
 
Returned Value

A reference to the removed node.


Powered by Linode.