HTMLInputElement.select()

El método HTMLInputElement.select() selecciona todo el texto en un elemento <textarea> o un elemento<input> con un campo de texto.

Sintaxis

element.select()

Especificaciones

Specification
HTML Standard
# dom-textarea/input-select

Notas

Llamando a element.select() no necesariamente se enfoca el campo, por lo que suele utilizarse junto con HTMLElement.focus().

Ver también