HTMLInputElement.select()
        
        
          
                Baseline
                
                  Widely available
                
                
              
        
        
        
          
                
              
                
              
                
              
        
        
      
      This feature is well established and works across many devices and browser versions. It’s been available across browsers since julio de 2015.
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> # dom-textarea/input-select> | 
Notas
Llamando a element.select() no necesariamente se enfoca el campo, por lo que suele utilizarse junto con HTMLElement.focus().