$('input,textarea').on('blur',function(){
window.scroll(0,0);
});
$('select').on('change',function(){
window.scroll(0,0);
});
document.body.addEventListener('focusout', function () {
window.scrollTo(0, 0);
})
失去焦点后,重新让滚动条滚动到之前的位置
$("input").blur(function () {
setTimeout(function() {
var scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0;
window.scrollTo(0, Math.max(scrollHeight - 1, 0));
}, 100);
});
失去焦点以后重新设置页面顶部位置