问题:
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.我想执行一段 javascript,它将从它所在的任何元素清除焦点,而无需提前知道焦点在哪个元素上。 It has to work on firefox 2 as well as more modern browsers.它必须适用于 Firefox 2 以及更现代的浏览器。
Is there a good way to do this?有没有好的方法可以做到这一点?
解决方案:
参考一: https://en.stackoom.com/question/AZje参考二: https://stackoom.com/question/AZje