collapsed property (Range)
Returns a Boolean value that indicates whether the start and end points of the current Range are in the same position.
Note: The Range object and its collapsed property are supported in Internet Explorer from version 9.You can get the boundary points with the startContainer, startOffset, endContainer and endOffset properties. If you want to collapse a Range, use the collapse method.
You can find the related objects in the Supported by objects section below.
This property is read-only.
Boolean that indicates the relation between the boundary points of the Range object.
One of the following values:
|The start and end points are in different positions.|
|The start and end points are at the same position.|
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the collapsed property:
Did you find this example helpful?
User Contributed Comments