aboutsummaryrefslogtreecommitdiff
path: root/files/fr/web/api/htmlorforeignelement/blur/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/fr/web/api/htmlorforeignelement/blur/index.html')
-rw-r--r--files/fr/web/api/htmlorforeignelement/blur/index.html89
1 files changed, 0 insertions, 89 deletions
diff --git a/files/fr/web/api/htmlorforeignelement/blur/index.html b/files/fr/web/api/htmlorforeignelement/blur/index.html
deleted file mode 100644
index 9eb3fa7a64..0000000000
--- a/files/fr/web/api/htmlorforeignelement/blur/index.html
+++ /dev/null
@@ -1,89 +0,0 @@
----
-title: HTMLElement.blur()
-slug: Web/API/HTMLOrForeignElement/blur
-tags:
- - API
- - DOM
- - HTMLElement
- - Method
- - Reference
-translation_of: Web/API/HTMLOrForeignElement/blur
-original_slug: Web/API/Element.blur
----
-<div>
-<div>{{ APIRef("HTML DOM") }}</div>
-</div>
-
-<p>La méthode <code><strong>HTMLElement.blur()</strong></code> retire le focus de l'élément courant.</p>
-
-<h2 id="Syntax" name="Syntax">Syntax</h2>
-
-<pre class="syntaxbox"><em>elt</em>.blur()</pre>
-
-<h2 id="Specification" name="Specification">Exemples</h2>
-
-<h3 id="Remove_focus_from_a_text_area" name="Remove_focus_from_a_text_area">Retirer le focus d'un champ texte</h3>
-
-<h4 id="HTML">HTML</h4>
-
-<pre class="brush: html line-numbers language-html"><code class="language-html"><span class="tag token"><span class="tag token"><span class="punctuation token">&lt;</span>input</span> <span class="attr-name token">type</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>text<span class="punctuation token">"</span></span> <span class="attr-name token">id</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>myText<span class="punctuation token">"</span></span> <span class="attr-name token">value</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"Champ texte</span><span class="punctuation token">."</span></span><span class="punctuation token">&gt;</span></span>
-<span class="tag token"><span class="tag token"><span class="punctuation token">&lt;</span>p</span><span class="punctuation token">&gt;</span></span><span class="tag token"><span class="tag token"><span class="punctuation token">&lt;/</span>p</span><span class="punctuation token">&gt;</span></span>
-<span class="tag token"><span class="tag token"><span class="punctuation token">&lt;</span>button</span> <span class="attr-name token">type</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>button<span class="punctuation token">"</span></span> <span class="attr-name token">onclick</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>focusMethod()<span class="punctuation token">"</span></span><span class="punctuation token">&gt;Cliquez-moi pour donner le focus</span></span><span class="tag token"><span class="tag token"><span class="punctuation token">&lt;/</span>button</span><span class="punctuation token">&gt;</span></span>
-<span class="tag token"><span class="tag token"><span class="punctuation token">&lt;</span>button</span> <span class="attr-name token">type</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>button<span class="punctuation token">"</span></span> <span class="attr-name token">onclick</span><span class="attr-value token"><span class="punctuation token">=</span><span class="punctuation token">"</span>blurMethod()<span class="punctuation token">"</span></span><span class="punctuation token">&gt;Cliquez-moi pour retirer le focus</span></span><span class="tag token"><span class="tag token"><span class="punctuation token">&lt;/</span>button</span><span class="punctuation token">&gt;</span></span></code></pre>
-
-<h4 id="JavaScript">JavaScript</h4>
-
-<pre class="brush: js line-numbers language-js"><code class="language-js">focusMethod <span class="operator token">=</span> <span class="keyword token">function</span> <span class="function token">getFocus</span><span class="punctuation token">(</span><span class="punctuation token">)</span> <span class="punctuation token">{</span>
- document<span class="punctuation token">.</span><span class="function token">getElementById</span><span class="punctuation token">(</span><span class="string token">"myText"</span><span class="punctuation token">)</span><span class="punctuation token">.</span><span class="function token">focus</span><span class="punctuation token">(</span><span class="punctuation token">)</span><span class="punctuation token">;</span>
-<span class="punctuation token">}</span>
-blurMethod <span class="operator token">=</span> <span class="keyword token">function</span> <span class="function token">getBlur</span><span class="punctuation token">(</span><span class="punctuation token">)</span> <span class="punctuation token">{</span>
- document<span class="punctuation token">.</span><span class="function token">getElementById</span><span class="punctuation token">(</span><span class="string token">"myText"</span><span class="punctuation token">)</span><span class="punctuation token">.</span><span class="function token">blur</span><span class="punctuation token">(</span><span class="punctuation token">)</span><span class="punctuation token">;</span>
-<span class="punctuation token">}</span></code></pre>
-
-<h4 id="Résultat">Résultat</h4>
-
-<p>{{ EmbedLiveSample('Remove_focus_from_a_text_area') }}</p>
-
-<h2 id="Specification" name="Specification">Spécification</h2>
-
-<table class="standard-table">
- <thead>
- <tr>
- <th scope="col">Specification</th>
- <th scope="col">Status</th>
- <th scope="col">Comment</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="Browser_compatibility" name="Browser_compatibility">Compatibilité navigateur</h2>
-
-
-<p>{{Compat("api.HTMLElement.blur")}}</p>
-<p>Dans IE9-10, il y a un bug où appeler <code>blur()</code> sur le {{HTMLElement("body")}} change la fenêtre active du navigateur vers une autre application.</p>
-
-<h2 id="Voir_aussi">Voir aussi</h2>
-
-<p>La méthode DOM {{domxref("HTMLElement.focus()")}}</p>