1 var a = 0;
 2 $(window).on('touchstart' , function(e){
 3     a = e.touches[0].screenY;
 4 });
 5 $(window).on('touchmove' , function(e){
 6     var disY = e.touches[0].screenY - a;
 7         if(disY > 0){
 8           alert('向下')  
 9         }else{
10            alert('向上')
11         }
12 }

 

相关文章:

  • 2022-03-05
  • 2021-08-14
  • 2021-10-05
  • 2022-12-23
  • 2022-12-23
  • 2021-09-11
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-25
  • 2021-04-21
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
相关资源
相似解决方案