移动键盘 滚动input

window.addEventListener('resize', function () {
if(document.activeElement.tagName === 'INPUT'){
document.activeElement.scrollIntoView({behavior: "smooth"})
}
})

原文地址:https://www.cnblogs.com/chengyunshen/p/10240458.html