問題:
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