ReplaceChild insertBefore appendChild cloneCode usage

Source: Internet
Author: User

Download this case: nodeop.html (2.38 KB)
ReplaceChildOfUsage
Summary
Node replaceChild (Node newChild, Node oldChild)
Parameters
NewChild new replacement Node
OldChild node to be replaced
Return Value
Replaced old Node
-----------------------
CloneNode usage
Copy nodes and all child nodes
Summary
Node cloneNode (bool deep)
Parameters
If deep is true, the current node and all child nodes are copied.
Return Value
Current node copy
-----------------------------
AppendChildUsage
Insert a node as the last node of the current node
Summary
Node appendChild (Node newChild)
Parameters
NewChild node to be inserted
Return Value
Node TO BE INSERTED
-----------------------------
InsertBeforeUsage
Insert a node before a specified Node
Summary
Node insertBefore (Node newChild, Node refChild)
Parameters
NewChild node to be inserted
The refChild is located before the node to be inserted. If it is null, newChild is inserted to the last subnode of the current node.
Return Value
Node TO BE INSERTED
-----------------------------

Passed the test in ie 6 7 8 and ff

From: http://www.eyejs.com /? Action-viewnews-itemid-17

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.