HTML | DOM onselect Event

The onselect event in HTML DOM occurs when user selects some text in an element. This event is mostly used in <textarea> and <input> tag.

Syntax: