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