【发布时间】:2017-01-10 19:15:28
【问题描述】:
我不想删除滚动条。我希望它在那里表明还有更多要滚动的内容,但即使他们拖动滚动条,我也想阻止页面表单移动(直到发生特定事件)。我该怎么做?
这不起作用:
/* This does NOT stop the page form moving when the drag the scrollbar */
document.addEventListener( "scroll", function(event) {
console.log( "scrolled");
event.preventDefault();
event.stopPropagation();
return false;
},
false
);
【问题讨论】:
标签: javascript html events scroll dom-events