--- title: focusout slug: Web/Events/focusout translation_of: Web/API/Element/focusout_event ---

当元素即将失去焦点时,focusout 事件被触发。focusout 事件和 blur 事件之间的主要区别在于后者不会冒泡。

基本信息

Specification
DOM L3
Interface
{{domxref("FocusEvent")}}
Bubbles
Yes
Cancelable
No
Target
Element
Default Action
None.

属性

Property Type Description
target {{readonlyInline}} {{domxref("EventTarget")}} Event target losing focus.
type {{readonlyInline}} {{domxref("DOMString")}} The type of event.
bubbles {{readonlyInline}} {{jsxref("Boolean")}} Whether the event normally bubbles or not.
cancelable {{readonlyInline}} {{jsxref("Boolean")}} Whether the event is cancellable or not.
relatedTarget {{readonlyInline}} {{domxref("EventTarget")}} (DOM element) Event target receiving focus.

浏览器兼容性

{{CompatibilityTable}}

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatGeckoDesktop(52)}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}}
Feature Android Edge Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatGeckoMobile(52)}} {{CompatVersionUnknown}} {{CompatUnknown}} {{CompatVersionUnknown}}

相关事件