--- title: HTMLInputElement.select() slug: Web/API/HTMLInputElement/select tags: - API - HTML DOM - HTMLInputElement - NeedsCompatTable - Referencia - metodo translation_of: Web/API/HTMLInputElement/select ---
El método HTMLInputElement.select() selecciona todo el texto en un elemento {{HTMLElement("textarea")}} o un elemento{{HTMLElement("input")}} con un campo de texto.
element.select()
| Especificación | Estado | Comentario |
|---|---|---|
| {{SpecName('HTML WHATWG', 'forms.html#dom-textarea/input-select', 'select')}} | {{Spec2('HTML WHATWG')}} |
Llamando a element.select() no necesariamente se enfoca el campo, por lo que suele utilizarse junto con {{domxref("HTMLElement.focus()")}}.