We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

概述

onfocus 属性用来获取或设置当前元素的focus事件的事件处理函数.

语法

element.onfocus = event handling code

备注

当前元素获得键盘焦点时会触发focus事件.

在IE中,几乎所有类型的元素都会触发focus事件, 但在Gecko中,只有少数几种类型的元素会触发focus事件.

规范

不属于任何公开的规范.

文档标签和贡献者

此页面的贡献者: teoli, khalid32, ziyunfei
最后编辑者: teoli,