Alert a message when a text is selected in a text field:
The select event occurs when a text is selected (marked) in a text area or a text field.
The select() method triggers the select event, or attaches a function to run when a select event occurs.
Trigger the select event for the selected elements:
Attach a function to the select event:
|function||Optional. Specifies the function to run when the select event is triggered|
Your message has been sent to W3Schools.