MDN wants to talk to developers like you: https://qsurvey.mozilla.com/s3/8d22564490d8

HTMLInputElement.select()

The HTMLInputElement.select() method selects all the text in a <textarea> element or an <input> element with a text field.

Syntax

element.select()

Specification

Specification Status Comment
WHATWG HTML Living Standard
The definition of 'select' in that specification.
Living Standard  

Notes

Calling element.select() will not necessarily focus the input, so it is often used with HTMLElement.focus().

See also

Document Tags and Contributors

 Contributors to this page: jakobc, fscholz, kscarfone, Krinkle
 Last updated by: jakobc,