九点   |   二套 · 三套 · 四套 · 五套 · 六套   |   去豆瓣

你好,请 登录注册 · 九点指南
Delegating the focus and blur events

来自QuirksBlog
  Nowadays many JavaScripters are aware of the advantages of event delegation. Chris Heilmann and Dan Webb, among others, have discussed its advantages, and I've been using it as much as possible for about two years now.
  Event delegation is especially useful in effects like dropdown menus, where lots of events on links may take place that can easily be handled at the root level (an <ol> or <ul> in this case).
  There used to be one problem, though: although event delegation works fine for the mouse events, it does not work for the focus and blur events we need to make dropdown menus keyboard-accessible.
  In the course of my ongoing event research, however, I found a way to delegate the focus and blur events, too. Maybe one of......    (查看原文)
2008-04-14 22:16

1人推荐“Delegating the focus and blur events”  ·  ·  ·  ·  ·  · 

  
© 2005-2008 douban.com, all rights reserved
关于豆瓣 · 隐私原则