The removechild function can delete the specified child element of the parent element. This article describes the use of the removeChild () function in javascript, if you are interested in the jsremovechild function, you can use the removechild function to delete the specified child element of the parent element.
If this function successfully deletes a subnode, the deleted node is returned. otherwise, null is returned.
Syntax structure:
FatherObj. removeChild (childrenObj)
Parameter description:
1. fatherObj: the element object of the child element to be deleted.
2. childrenObj: the child element object to be deleted.
Note:
In Firefox, Google, and IE8 browsers, the blank content is also a text node, but the blank text nodes are ignored in IE8 and IE8 browsers, for more information, see Section 1 "how to obtain child nodes and parent nodes of an element" in javascript.
Code example:
Instance 1:
Foot home