Try it yourself »
Definition and Usage
The onselect event occurs after some text has been selected in an element.
The onselect event is supported in all major browsers.
onselect In HTML
The onselect attribute can be used with: <input type="file">, <input type="password">, <input type="text">, <keygen>, and <textarea>.
Thank You For Helping Us!
Your message has been sent to W3Schools.