diff options
Diffstat (limited to 'files/pt-br/web/api/htmlinputelement/select/index.html')
-rw-r--r-- | files/pt-br/web/api/htmlinputelement/select/index.html | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/files/pt-br/web/api/htmlinputelement/select/index.html b/files/pt-br/web/api/htmlinputelement/select/index.html new file mode 100644 index 0000000000..c560161be4 --- /dev/null +++ b/files/pt-br/web/api/htmlinputelement/select/index.html @@ -0,0 +1,52 @@ +--- +title: HTMLInputElement.select() +slug: Web/API/HTMLInputElement/select +tags: + - API + - HTML DOM + - HTMLInputElement + - Referencia + - Selecionar + - Select + - metodo +translation_of: Web/API/HTMLInputElement/select +--- +<div>{{ APIRef("HTML DOM") }}</div> + +<p>O método <strong><code>HTMLInputElement.select()</code></strong> seleciona todo o texto em um elemento {{HTMLElement("textarea")}} ou em um elemento {{HTMLElement("input")}} do tipo <em>text</em>.</p> + +<h2 id="Syntax" name="Syntax">Sintaxe</h2> + +<pre class="syntaxbox">element.select()</pre> + +<h2 id="Specification" name="Specification">Especificação</h2> + +<table class="standard-table"> + <thead> + <tr> + <th scope="col">Especificação</th> + <th scope="col">Estado</th> + <th scope="col">Comentário</th> + </tr> + </thead> + <tbody> + <tr> + <td>{{SpecName('HTML WHATWG', 'forms.html#dom-textarea/input-select', 'select')}}</td> + <td>{{Spec2('HTML WHATWG')}}</td> + <td> </td> + </tr> + </tbody> +</table> + +<h2 id="Notas">Notas</h2> + +<p>Executar <code>element.select()</code> não irá necessariamente focar o <em>input</em>, por isso é frequentemente usado em conjunto com {{domxref("HTMLElement.focus()")}}.</p> + +<h2 id="Veja_também">Veja também</h2> + +<ul> + <li>{{ HTMLElement("input") }}</li> + <li>{{ HTMLElement("textarea") }}</li> + <li>{{ domxref("HTMLInputElement") }}</li> + <li>{{ domxref("HTMLInputElement.setSelectionRange") }}</li> +</ul> |