deleteContents method (Range)
Deletes the contents of the current Range from the document tree.
Note: The Range object and its deleteContents method are supported in Internet Explorer from version 9.If you need the removed content for later use, delete the contents with the extractContents method.
You can find the related objects in the Supported by objects section below.
This method has no return value.
Example HTML code 1:
This example illustrates the use of the deleteContents method:
Did you find this example helpful?
User Contributed Comments