Javascript Reference
Categories: Range

javascript Range deleteContents( )

@March 15, 2008, 1:22 a.m.
deleteContents( )Firefox/Netscape/NN 6 IE n/a Chrome/Safari/DOM 2  

  

Removes the contents of the current text range from the document tree. If the range is an element node (e.g., with boundaries established via the selectNode( ) method), invoking deleteContents( ) on the range removes the node from the document tree and collapses the range. The Range object remains in memory, but without any content. If you want to capture the content prior to its deletion, do so with other Range object methods (such as cloneRange( ) and, when it works correctly, cloneContents( )).

 
Parameters

None.

 
Returned Value

None.


Powered by Linode.