endContainer property (Range)
Returns a reference to the deepest node in the DOM hierarchy that contains the end point of the current Range object.
Note: The Range object and its endContainer property are supported in Internet Explorer from version 9.Use it together with the endOffset property to get the exact end point of the current Range object.
Similarly, you can get the start point of a Range with the startContainer and startOffset properties.
You can find the related objects in the Supported by objects section below.
This property is read-only.
Reference to the deepest node that contains the end point of the Range object.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the endContainer property:
Did you find this example helpful?
User Contributed Comments