If they're the same, then why there are two of this kind of event?
If they're the same, then why there are two of this kind of event?
As you know, the onBlur event fires for an element if that element had the focus, but loses it.
在这种情况下,onFocusOut事件会触发,但如果任何子元素失go 焦点,也会触发.
例如,您有一个具有特殊格式的div,因为人类当前正在编辑该区域中的字段.当焦点离开该div时,您可以使用onFocusOut来关闭该格式.
直到最近,onFocusOut才被IE使用.如果这已经改变,那就是最近的事了.使用FF、 chromium 等进行测试.