移动键盘 滚动input

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

posted @ 2019-01-08 18:01  橙云生  阅读(210)  评论(0编辑  收藏  举报