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 โจjulho de 2015โฉ.
O mรฉtodo HTMLInputElement.select()
seleciona todo o texto em um elemento <textarea>
ou em um elemento <input>
do tipo text.
Sintaxe
element.select()
Especificaรงรตes
Specification |
---|
HTML # dom-textarea/input-select |
Compatibilidade com navegadores
Loadingโฆ
Notas
Executar element.select()
nรฃo irรก necessariamente focar o input, por isso รฉ frequentemente usado em conjunto com HTMLElement.focus()
.