Execute a JavaScript after some text has been selected in an <input> element:
![]()
The onselect event attribute is supported in all major browsers.
The onselect attribute fires after some text has been selected in an element.
The onselect attribute can be used within: <input type="file">, <input type="password">, <input type="text">, <keygen>, and <textarea>.
None.
| Value | Description |
|---|---|
| script | The script to be run on onselect |
HTML Event Attributes
Your message has been sent to W3Schools.