demo:

// 解决本页面软键盘弹窗背景挤压的问题
  var clientHeight = document.documentElement.clientHeight || document.body.clientHeight;
  $(window).on('resize', function () {
  var nowClientHeight = document.documentElement.clientHeight || document.body.clientHeight;
  if (clientHeight > nowClientHeight) {
      //键盘弹出的事件处理
  }
  else {
      //键盘收起的事件处理
  }
});

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
猜你喜欢
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-18
相关资源
相似解决方案