这是一个实验中的功能
此功能某些浏览器尚在开发中,请参考浏览器兼容性表格以得到在不同浏览器中适合使用的前缀。由于该功能对应的标准文档可能被重新修订,所以在未来版本的浏览器中该功能的语法和行为可能随之改变。
FocusEvent
接口表示和焦点相关的事件比如 focus
, blur
, focusin
, 和 focusout
。
构造器
FocusEvent()
- 使用给定的参数去创建FocusEvent事件。
属性
Inherits properties from its parent UIEvent
, and indirectly from Event
.
FocusEvent.relatedTarget
只读- Is an
EventTarget
representing a secondary target for this event. As in some cases (like when tabbing in or out a page), this property may be set tonull
for security reasons.
方法
No specific method; inherits methods from its parent UIEvent
, and indirectly from Event
.
Specifications
Specification | Status | Comment |
---|---|---|
Document Object Model (DOM) Level 3 Events Specification FocusEvent |
Working Draft | Initial definition. |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | (Yes) | 24.0 (24.0) | 9.0 | (Yes) | (Yes) |
Constructor | (Yes) | 24.0 (24.0) | 未实现 | (Yes) | (Yes) |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | (Yes) | 24.0 (24.0) | (Yes) | (Yes) | (Yes) |
Constructor | (Yes) | 24.0 (24.0) | 未实现 | (Yes) | (Yes) |
See also
- The
Event
base interface.