<!doctype html>
<head>
<meta charset="utf-8">
<title>禁用手机默认的触屏滚动行为</title>
</head>
<body>
<script>
//阻止默认
$("body").on("touchmove",function(event){
event.preventDefault;
}, false)
//然后点击取消或者确定时再取消body上的绑定
$("body").off("touchmove");
</script>
</body>
</html>
<head>
<meta charset="utf-8">
<title>禁用手机默认的触屏滚动行为</title>
</head>
<body>
<script>
//阻止默认
$("body").on("touchmove",function(event){
event.preventDefault;
}, false)
//然后点击取消或者确定时再取消body上的绑定
$("body").off("touchmove");
</script>
</body>
</html>
本文介绍了一种方法来禁用手机浏览器中的默认触屏滚动行为,并提供了使用jQuery实现的具体代码示例。
8278

被折叠的 条评论
为什么被折叠?



