HTMLTextAreaElement: select event
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The select event of the HTMLTextAreaElement interface fires when the selection's extent or direction is changed programmatically, or when the user selects text.
For general information about this event, see HTMLInputElement: select event.
Syntax
Use the event name in addEventListener():
js
addEventListener("select", (event) => { })
Alternatively, assign to the event handler property of the interface:
js
onselect = (event) => { }
Event type
A generic Event.
Specifications
| Specification |
|---|
| HTML> # event-select> |
| HTML> # handler-onselect> |