aboutsummaryrefslogtreecommitdiff
path: root/files/pt-br/web/api/htmlorforeignelement/blur
diff options
context:
space:
mode:
authorFlorian Dieminger <me@fiji-flo.de>2021-02-11 18:27:17 +0100
committerGitHub <noreply@github.com>2021-02-11 18:27:17 +0100
commitad7f998115dd568832332484debf1f1b16b0c905 (patch)
tree2f3a9137e20731b7f6880fe5adb31fa439215d7d /files/pt-br/web/api/htmlorforeignelement/blur
parent7a94b4d8daf297eda6df8e5cf933f7ba159bbc76 (diff)
parent1d435be33d8b76cd7b06cd06996c19d74f83cfd4 (diff)
downloadtranslated-content-ad7f998115dd568832332484debf1f1b16b0c905.tar.gz
translated-content-ad7f998115dd568832332484debf1f1b16b0c905.tar.bz2
translated-content-ad7f998115dd568832332484debf1f1b16b0c905.zip
Merge pull request #41 from fiji-flo/unslugging-pt-br
Unslugging pt br
Diffstat (limited to 'files/pt-br/web/api/htmlorforeignelement/blur')
-rw-r--r--files/pt-br/web/api/htmlorforeignelement/blur/index.html90
1 files changed, 90 insertions, 0 deletions
diff --git a/files/pt-br/web/api/htmlorforeignelement/blur/index.html b/files/pt-br/web/api/htmlorforeignelement/blur/index.html
new file mode 100644
index 0000000000..a8143402ef
--- /dev/null
+++ b/files/pt-br/web/api/htmlorforeignelement/blur/index.html
@@ -0,0 +1,90 @@
+---
+title: HTMLElement.blur()
+slug: Web/API/HTMLOrForeignElement/blur
+tags:
+ - API
+ - DOM HTML
+ - Foco
+ - HTMLElement
+ - Referencia
+ - metodo
+translation_of: Web/API/HTMLOrForeignElement/blur
+original_slug: Web/API/HTMLElement/blur
+---
+<div>{{ APIRef("HTML DOM") }}</div>
+
+<p>O método <code><strong>HTMLElement.blur()</strong></code> remove o foco do teclado no elemento corrente.</p>
+
+<h2 id="Sintaxe">Sintaxe</h2>
+
+<pre class="syntaxbox"><em>elemento</em>.blur();</pre>
+
+<h2 id="Exemplos">Exemplos</h2>
+
+<h3 id="Removendo_o_foco_de_um_input_de_texto">Removendo o foco de um input de texto</h3>
+
+<h4 id="HTML">HTML</h4>
+
+<pre class="brush: html">&lt;input type="text" id="meuTexto" value="Texto Exemplo"&gt;
+&lt;br&gt;&lt;br&gt;
+&lt;button type="button" onclick="focusInput()"&gt;Clique para definir o foco&lt;/button&gt;
+&lt;button type="button" onclick="blurInput()"&gt;Clique para remover o foco&lt;/button&gt;</pre>
+
+<h4 id="JavaScript">JavaScript</h4>
+
+<pre class="brush: js">function focusInput() {
+ document.getElementById('meuTexto').focus();
+}
+function blurInput() {
+ document.getElementById('meuTexto').blur();
+}</pre>
+
+<h4 id="Resultado">Resultado</h4>
+
+<p>{{ EmbedLiveSample('Remove_focus_from_a_text_input') }}</p>
+
+<h2 id="Especificação">Especificação</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Especificação</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comentário</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', 'editing.html#dom-blur', 'blur')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML5.1', 'editing.html#blur()-0', 'blur')}}</td>
+ <td>{{Spec2('HTML5.1')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML5 W3C', 'editing.html#dom-blur', 'blur')}}</td>
+ <td>{{Spec2('HTML5 W3C')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('DOM2 HTML', 'html.html#ID-28216144', 'blur')}}</td>
+ <td>{{Spec2('DOM2 HTML')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilidade_com_navegadores">Compatibilidade com navegadores</h2>
+
+
+
+<p>{{Compat("api.HTMLElement.blur")}}</p>
+
+<h2 id="Veja_também">Veja também</h2>
+
+<ul>
+ <li>Método DOM {{domxref("HTMLElement.focus()")}}</li>
+</ul>