禁止页面滚动的方法

平时作的大部分禁止页面滚动都是用preventDefault,附上代码css function handler() { event.preventDefault();} // 绑定事件document.addEventListener('touchmove', handler, false);// 解绑事件document.removeEventListener('touchmove', ha
相关文章
相关标签/搜索