【问题标题】:Jquery Focusing another element on blur is not working in FireFoxJquery将另一个元素聚焦在模糊上在FireFox中不起作用
【发布时间】:2015-08-25 07:18:26
【问题描述】:

我正在尝试将另一个输入元素集中在一个输入的模糊事件上。但它不起作用。

<input type="text"/>
<input type="text"/>


$("input:last").on("blur",function(e){
   $("input:first").focus();
})

光标不存在于元素中。所以我无法输入任何内容。

http://jsfiddle.net/7foref2g/

【问题讨论】:

  • 你也可以添加你的HTML代码
  • 在 chrome 中工作正常
  • 可能是因为第一个 input 不是文本框。试试Demo
  • 在 Chrome 中运行良好。您使用的是什么浏览器和版本?

标签: javascript jquery firefox input focus


【解决方案1】:
猜你喜欢
  • 1970-01-01
  • 2020-07-29
  • 2014-03-08
  • 2012-08-20
  • 2012-04-11
  • 1970-01-01
  • 1970-01-01
  • 2015-04-30
  • 2021-01-31
相关资源
最近更新 更多