Browser version:
IE6/24/60/9
Ie10 preview2
Firefox 5
Safari 5
Chrome 12
Opera 11
Test:
| |
IE6/7/8 |
Ie9/10 |
Firefox5 |
Safari5 |
Chrome12 |
Opera11 |
| El. onfocusin |
Y |
Y |
N |
N |
N |
Y |
| El. attachevent ('onfocusin ', FN) |
Y |
Y |
N |
N |
N |
Y |
| El. addeventlistener ('focusin ', FN, false ); |
N |
Y |
N |
Y |
Y |
Y |
Conclusion:
1. All ie versions support focusin/focusout events (Note: The El. addeventlistener method is not supported in IE6/7/8 ).
2. Opera supports attachevent and addeventlistener. Both methods support focusin and focusout events.
3. Safari/Chrome is a surprise. Although El. onfocusin is not supported
Addeventlistener Method . Therefore, to enable Safari/chrome to support focusin events, you can only add events using addeventlistener.
4. focusin/focusout is not supported for any method of adding events in Firefox.
Differences from focus/Blur :
focusin/focusout supports event bubbling, so you can implement event proxy for it.
related:
http://msdn.microsoft.com/en-us/library/ms536935%28VS.85%29.aspx
http://msdn.microsoft.com/en-us/library/ms536936%28VS.85%29.aspx