window.addEventListener('resize', function () {
alert(document.activeElement.tagName);
if (document.activeElement.tagName === 'INPUT' || document.activeElement.tagName ===
'TEXTAREA') {
window.setTimeout(function () {
document.activeElement.scrollIntoViewIfNeeded()
}, 0)
}
})
解决安卓手机键盘遮住输入框
最新推荐文章于 2024-03-05 11:40:21 发布