From e9eae2d4257e8e561a6234c9a0baf1bd1166f707 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Sun, 9 Jan 2022 16:15:16 +0900 Subject: FocusEvent 関係のインターフェイス・イベントの記事を変換準備 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- files/ja/web/api/element/focusout_event/index.html | 110 --------------------- files/ja/web/api/element/focusout_event/index.md | 110 +++++++++++++++++++++ 2 files changed, 110 insertions(+), 110 deletions(-) delete mode 100644 files/ja/web/api/element/focusout_event/index.html create mode 100644 files/ja/web/api/element/focusout_event/index.md (limited to 'files/ja/web/api/element/focusout_event') diff --git a/files/ja/web/api/element/focusout_event/index.html b/files/ja/web/api/element/focusout_event/index.html deleted file mode 100644 index 0e0e661a6b..0000000000 --- a/files/ja/web/api/element/focusout_event/index.html +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: 'Element: focusout イベント' -slug: Web/API/Element/focusout_event -tags: - - API - - DOM - - Element - - Event - - FocusEvent - - Reference - - focusout - - onfocusout - - イベント -translation_of: Web/API/Element/focusout_event ---- -
{{APIRef}}
- -

focusout イベントは、要素がフォーカスを失おうとしているときに発生します。このイベントと {{domxref("Element/blur_event", "blur")}} との主な違いは、 focusoutバブリングを行うのに対し blur は行わないことです。

- -

focusout の反対は {{domxref("Element/focusin_event", "focusin")}} です。

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
バブリングあり
キャンセル不可
インターフェイス{{DOMxRef("FocusEvent")}}
イベントハンドラープロパティ{{domxref("GlobalEventHandlers/onfocusout", "onfocusout")}}
同期 / 非同期同期
Composedはい
- -

- -

ライブデモ

- -

HTML

- -
<form id="form">
-  <input type="text" placeholder="text input">
-  <input type="password" placeholder="password">
-</form>
- -

JavaScript

- -
const form = document.getElementById('form');
-
-form.addEventListener('focusin', (event) => {
-  event.target.style.background = 'pink';
-});
-
-form.addEventListener('focusout', (event) => {
-  event.target.style.background = '';
-});
- -

結果

- -

{{EmbedLiveSample("Live_example", '100%', '50px')}}

- -

仕様書

- - - - - - - - - - - - - - - - - - - - - -
仕様書状態備考
{{SpecName("UI Events", "#event-type-focusout")}}{{Spec2("UI Events")}}Added info that this event is composed.
{{SpecName("DOM3 Events", "#event-type-focusout")}}{{Spec2("DOM3 Events")}}初回定義
- -

ブラウザーの互換性

- -

{{Compat("api.Element.focusout_event")}}

- -

関連情報

- - diff --git a/files/ja/web/api/element/focusout_event/index.md b/files/ja/web/api/element/focusout_event/index.md new file mode 100644 index 0000000000..0e0e661a6b --- /dev/null +++ b/files/ja/web/api/element/focusout_event/index.md @@ -0,0 +1,110 @@ +--- +title: 'Element: focusout イベント' +slug: Web/API/Element/focusout_event +tags: + - API + - DOM + - Element + - Event + - FocusEvent + - Reference + - focusout + - onfocusout + - イベント +translation_of: Web/API/Element/focusout_event +--- +
{{APIRef}}
+ +

focusout イベントは、要素がフォーカスを失おうとしているときに発生します。このイベントと {{domxref("Element/blur_event", "blur")}} との主な違いは、 focusoutバブリングを行うのに対し blur は行わないことです。

+ +

focusout の反対は {{domxref("Element/focusin_event", "focusin")}} です。

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
バブリングあり
キャンセル不可
インターフェイス{{DOMxRef("FocusEvent")}}
イベントハンドラープロパティ{{domxref("GlobalEventHandlers/onfocusout", "onfocusout")}}
同期 / 非同期同期
Composedはい
+ +

+ +

ライブデモ

+ +

HTML

+ +
<form id="form">
+  <input type="text" placeholder="text input">
+  <input type="password" placeholder="password">
+</form>
+ +

JavaScript

+ +
const form = document.getElementById('form');
+
+form.addEventListener('focusin', (event) => {
+  event.target.style.background = 'pink';
+});
+
+form.addEventListener('focusout', (event) => {
+  event.target.style.background = '';
+});
+ +

結果

+ +

{{EmbedLiveSample("Live_example", '100%', '50px')}}

+ +

仕様書

+ + + + + + + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName("UI Events", "#event-type-focusout")}}{{Spec2("UI Events")}}Added info that this event is composed.
{{SpecName("DOM3 Events", "#event-type-focusout")}}{{Spec2("DOM3 Events")}}初回定義
+ +

ブラウザーの互換性

+ +

{{Compat("api.Element.focusout_event")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf