MDN self-hosted library · e01.org

HTMLTextAreaElement: selectionEnd property

HTML DOM

no runnable cells web-api-instance-property upstream source

HTML DOM

The selectionEnd property of the HTMLTextAreaElement interface specifies the end position of the current text selection in a textarea element.

For general information about this property, see HTMLInputElement.selectionEnd.

Value

A non-negative number representing the zero-based index immediately after the last selected character, or the caret position if no text is selected.

Specifications

Browser compatibility

See also

  • textarea
  • HTMLTextAreaElement
  • HTMLTextAreaElement.selectionStart
  • HTMLTextAreaElement.selectionDirection
  • selectionchange event
  • HTMLTextAreaElement.select()
  • HTMLTextAreaElement.setSelectionRange()
  • HTMLTextAreaElement.setRangeText()
  • HTMLInputElement.selectionEnd
  • Selection
  • ::selection pseudo-element