The replaceChild MethodThe replaceChild method replaces an existing child node with a new child node. You can see the support for this method in Table 6.44. Table 6.44. The replaceChild Method
To use this method, you pass the new node object and the old child node you want to replace. The replaced node is returned. For an example, take a look at the section "The appendChild Method" in this chapter. |