Partilhar via


removeChild method

Removes a child node from the object.

 

Syntax

IHTMLDOMNode retVal = object.removeChild(oldChild);

Parameters

  • oldChild [in]
    Type: IHTMLDOMNode

    Pointer to an IDispatch that specifies the element to be removed from the document.

Standards information

Remarks

The node to be removed must be an immediate child of the parent object.

This method is accessible at run time. If elements are removed at run time, before the closing tag is parsed, areas of the document might not render.

Windows Internet Explorer 9. Exceptions are only supported when webpages are displayed in IE9 Standards mode.

In Microsoft Internet Explorer 6, This method now applies to the attribute object.