1    window.ontouchstart = function(e) { e.preventDefault(); };
2     document.addEventListener("touchmove", function(e){ e.preventDefault(); }, false);

这里的document和window可以通用互换,不影响使用效果;

后期查到后在补充吧;

以后在移动页面开发中,如果要禁止掉,默认长按和默认拖动事件就可以这样做;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-17
  • 2021-05-19
相关资源
相似解决方案