html5 IOS 软键盘弹出解决方案

html5 IOS 软键盘弹出解决方案

function iostcruanjianpan() {
$('input,textarea,select').on('blur', function() {
setTimeout(function() {
//判断是不是继续点击第二个input继续 如果是 那不用 页面往下移 页面不会往上弹了
var isfocus = $("input,textarea,select").is(":focus");
if (isfocus != 1) {
//输入完以后页面整体会往上移
$('body').scrollTop(0);
}
}, 200)
});
}

 

解决了输入完 页面不会往上挤的问题 。。。

 

posted @ 2020-11-01 15:13  newmiracle宇宙  阅读(736)  评论(0编辑  收藏  举报