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)
});
}

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

原文地址:https://www.cnblogs.com/newmiracle/p/13909562.html