查了好一会资料,发现keyup事件在ios系统下存在不兼容问题,解决的方法是通过 html5的 oninput事件来实现,代码如下;

<input id="input" type="text" />
document.querySelector('#input').addEventListener('input',function(){
    //do something
});
            document.querySelector('#input').oninput=function(){
    //do something
} 

 

相关文章:

  • 2021-10-19
  • 2022-01-07
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-17
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
相关资源
相似解决方案