HTMLTextAreaElement: selectionStart property - Web APIs | MDN
Value
A non-negative number.
Examples
js
const textarea = document.getElementById("text-box");
const start = textarea.selectionStart;
Specifications
| Specification |
|---|
| HTML # dom-textarea/input-selectionstart |
Browser compatibility
See also
<textarea>HTMLTextAreaElementHTMLTextAreaElement.selectionEndHTMLTextAreaElement.selectionDirectionHTMLTextAreaElement.textLengthHTMLTextAreaElement.select()HTMLTextAreaElement.setSelectionRange()HTMLTextAreaElement.setRangeText()HTMLInputElement.selectionStartSelection::selectionpseudo-element