ios移动端input输入内容时向上偏移

 

$(document).on('blur', 'input', function () {undefined
            setTimeout(function () {undefined
                var scrollHeight = document.documentElement.scrollTop || document.body.scrollTop || 0;
                window.scrollTo(0, Math.max(scrollHeight - 1, 0));
            }, 100);
        });

 

posted @ 2021-11-24 10:51  web格调  阅读(341)  评论(0编辑  收藏  举报