我需要使用一个学校的网站,只要你点击一个输入框就滚动页面。有没有办法禁止JS滚动页面?
我找到了JS的滚动部分。
// Automatically scroll to inputs when they gain focus. Do not do this for Partner Chat, where there is only one input.
$('#activity_shell').find('input').each(function(){
if ($(this).attr('type') == 'text') {
$(this).focus(function(){ $('html, body').animate({scrollTop: ($(this).offset().top) - 200}, 200); });
}
});