How do you clear the focus in javascript?

Posted by Andres on Stack Overflow See other posts from Stack Overflow or by Andres
Published on 2010-03-26T01:35:12Z Indexed on 2010/03/26 1:43 UTC
Read the original article Hit count: 407

Filed under:
|
|

I know this shouldn't be that hard, but I couldn't find the answer on Google.

I want to execute a piece of javascript that will clear the focus from whatever element it is on without knowing ahead of time which element the focus is on. It has to work on firefox 2 as well as more modern browsers.

Is there a good way to do this?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about focus