See Event (MDN Web Docs) for more details.
Fires when the user selects text in the control.
The onSelect event fires when the user selects text within a TextBox or TextArea control. Selection is when the user highlights text in a text control. Selection is often used when choosing text to copy from the control.