你如何清除javascript中的焦点? - 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.我想执行一段 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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章