Two Methods of Preventing Mobile Page Scroll by js
- 2021-07-13 04:30:21
- OfStack
Method 1:
$(document).on('touchmove',function(e){
e.preventDefault();
})
Method 2:
position: fixed;top:0;left: 0;
Method 1:
$(document).on('touchmove',function(e){
e.preventDefault();
})
Method 2:
position: fixed;top:0;left: 0;