collapseToStart method (selectionRange)
Moves the end point of the current selectionRange object to its start point.
Note: The selectionRange object and its collapseToStart method are supported in Internet Explorer from version 9.The selectionRange object represents the current selection. Use the anchorNode, anchorOffset, focusNode and focusOffset properties to retrieve the boundary points and the isCollapsed property to detect whether a selectionRange object is collapsed.
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 collapseToStart method:
Did you find this example helpful?
User Contributed Comments