admin管理员组文章数量:1278721
I am using onfocusout as an html attribute and some javascript code inside it. Nevertheless, the code works fine in Chrome and browsers powered by webkit engines but it doesn't work in Firefox, I haven't tested other browsers yet.
Is there any alternative for 'onfocusout' attribute which is supported at least by firefox and chrome?
I am using onfocusout as an html attribute and some javascript code inside it. Nevertheless, the code works fine in Chrome and browsers powered by webkit engines but it doesn't work in Firefox, I haven't tested other browsers yet.
Is there any alternative for 'onfocusout' attribute which is supported at least by firefox and chrome?
Share Improve this question edited Dec 31, 2011 at 6:34 animuson♦ 54.8k28 gold badges142 silver badges150 bronze badges asked Dec 31, 2011 at 6:28 NahiyanNahiyan 5325 silver badges21 bronze badges 2-
Can you use
onblur
instead? – jfriend00 Commented Dec 31, 2011 at 6:32 - 1 It may be worth adding more information to make your question more specific. This will help others to provide more insightful feedback. For example, add more detail about what you are trying to focus out, and provide code snippets. – Brombomb Commented Dec 31, 2011 at 6:38
3 Answers
Reset to default 6Can you use onblur
?
Not sure what elements you are targeting but blur
may work for you.
If that doesn't work for you then you may want to include a framework like jQuery
which will help you with such cross browser issues.
http://api.jquery./focusout/
I know this question is from 2011, just want to let everyone know that FireFox support for this attribute is now available since March 6th, 2017: https://caniuse./#search=focusout
本文标签: javascriptFirefox doesn39t support onfocusoutStack Overflow
版权声明:本文标题:javascript - Firefox doesn't support onfocusout - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741257105a2366889.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论