RemoveChild () function usage in JavaScript _ javascript skills

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.