JavaScript的焦点在Firefox [英] Javascript focus in firefox
问题描述
有什么想法?
是的。它不能在Firefox中工作。我不知道为什么。但是,它的工作原理,如果我们在Firefox中执行以下操作。去
工具 - >选项
点击标签。
检查选项当我在新选项卡中打开一个链接,立即切换到。
这会直接将您带到已打开的选项卡上,并且集中在一起工作。这不是解决方案。这将只适用于你的Firefox的课程。不能保证用户有选择检查。 :(
I want to focus on a special textbox when page is loaded. I do this with js function focus() and it works fine. But when I open the page in a new tab in firefox, it doesn't focus on the textbox. any idea?
yep. It doesn't work in firefox. i dunno why. But it works, if we do the following in firefox. go to Tools --> Options click on Tabs. Check the option "When i open a link in a new tab, switch to it immediately".
This will take you to the opened tab directly and onfocus works. This is not the solution. This will work only on your firefox ofcourse. can't guarantee users have that option checked. :(
这篇关于JavaScript的焦点在Firefox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!