var winHeight = $(window).height();
$(window).resize(function () {
var thisHeight = $(this).height();
if (winHeight - thisHeight > 50) {
setTimeout(function () { window.scrollTo(0, document.body.scrollHeight); }, 300) // 滚动条加载到底部;
} else {
//窗口发生改变(小),故此时键盘收起
//当软键盘收起,在此处操作
}
});