1、禁止浏览器滚动
1 document.addEventListener('touchmove', function (event) { 2 event.preventDefault(); 3 }, false);
1 document.addEventListener('touchmove', function (event) { 2 window.event.returnValue = false; 3 }, false);
2、允许浏览器滚动事件
1 document.addEventListener('touchmove', function (event) { 2 window.event.returnValue = true; 3 }, false);
文章摘自 : https://blog.csdn.net/iceking66/article/details/78261029/