From 39f2114f9797eb51994966c6bb8ff1814c9a4da8 Mon Sep 17 00:00:00 2001 From: Florian Merz Date: Thu, 11 Feb 2021 12:36:08 +0100 Subject: unslug fr: move --- files/fr/web/api/element.blur/index.html | 88 -------------------------------- 1 file changed, 88 deletions(-) delete mode 100644 files/fr/web/api/element.blur/index.html (limited to 'files/fr/web/api/element.blur') diff --git a/files/fr/web/api/element.blur/index.html b/files/fr/web/api/element.blur/index.html deleted file mode 100644 index 6c5f12166c..0000000000 --- a/files/fr/web/api/element.blur/index.html +++ /dev/null @@ -1,88 +0,0 @@ ---- -title: HTMLElement.blur() -slug: Web/API/Element.blur -tags: - - API - - DOM - - HTMLElement - - Method - - Reference -translation_of: Web/API/HTMLOrForeignElement/blur ---- -
-
{{ APIRef("HTML DOM") }}
-
- -

La méthode HTMLElement.blur() retire le focus de l'élément courant.

- -

Syntax

- -
elt.blur()
- -

Exemples

- -

Retirer le focus d'un champ texte

- -

HTML

- -
<input type="text" id="myText" value="Champ texte.">
-<p></p>
-<button type="button" onclick="focusMethod()">Cliquez-moi pour donner le focus</button>
-<button type="button" onclick="blurMethod()">Cliquez-moi pour retirer le focus</button>
- -

JavaScript

- -
focusMethod = function getFocus() {
-  document.getElementById("myText").focus();
-}
-blurMethod = function getBlur() {
-  document.getElementById("myText").blur();
-}
- -

Résultat

- -

{{ EmbedLiveSample('Remove_focus_from_a_text_area') }}

- -

Spécification

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'editing.html#dom-blur', 'blur')}}{{Spec2('HTML WHATWG')}}
{{SpecName('HTML5.1', 'editing.html#blur()-0', 'blur')}}{{Spec2('HTML5.1')}}
{{SpecName('HTML5 W3C', 'editing.html#dom-blur', 'blur')}}{{Spec2('HTML5 W3C')}}
{{SpecName('DOM2 HTML', 'html.html#ID-28216144', 'blur')}}{{Spec2('DOM2 HTML')}}
- -

Compatibilité navigateur

- - -

{{Compat("api.HTMLElement.blur")}}

-

Dans IE9-10, il y a un bug où appeler blur() sur le {{HTMLElement("body")}} change la fenêtre active du navigateur vers une autre application.

- -

Voir aussi

- -

La méthode DOM {{domxref("HTMLElement.focus()")}}

-- cgit v1.2.3-54-g00ecf