Javascript Reference
Categories: Node

javascript Node swapNode( )

@March 15, 2008, 1:22 a.m.
swapNode( )Firefox/Netscape/NN n/a IE 5(Win) Chrome/Safari/DOM n/a  



Exchanges the current node (in the document tree) with a different node passed as a parameter. The other node object can be created anew, or it can be a reference to a node elsewhere in the document tree. In the latter case, the result is the same as a bi-directional exchange, where the two nodes essentially change places. If the two nodes are of different node types or element display types (e.g., an inline versus a block-level element), the rendering of the document may be affected significantly.

  • Reference to any node object, usually another node in the document tree.
Returned Value

Reference to the node from which the method is invoked (i.e., the current node).

Powered by Linode.