android写法
if (/Android/gi.test(navigator.userAgent)) {
window.addEventListener('resize', function () {
if (document.activeElement.tagName == 'INPUT' || document.activeElement.tagName == 'TEXTAREA') {
window.setTimeout(function () {
document.activeElement.scrollIntoViewIfNeeded();
}, 0);
}
})
}
IOS写法
if (!/Android/gi.test(navigator.userAgent)) {
document.body.scrollTop = document.body.scrollHeight / 8
}