The replaceChild Method


The replaceChild Method

The 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

Method

NS2

NS3

NS4

NS6

IE3a

IE3b

IE4

IE5

IE5.5

IE6

replaceChild( newNode , oldNode )

     

x

     

x

x

x

 

Returns: Node object

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.



Inside Javascript
Inside JavaScript
ISBN: 0735712859
EAN: 2147483647
Year: 2005
Pages: 492
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net