How do you clear the focus in javascript?

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?

8 Answers
8

Leave a Comment