SOURCE

console 命令行工具 X clear

                    
>
console
inputFocus: function (e) {
            var winobj = $(window),
                scope = this,
                agent = navigator.userAgent.toLowerCase();
            setTimeout(function () {
                if (agent.indexOf('safari') != -1 && agent.indexOf('mqqbrowser') == -1
                    && agent.indexOf('coast') == -1 && agent.indexOf('android') == -1
                    && agent.indexOf('linux') == -1 && agent.indexOf('firefox') == -1) {//safra浏览器
                    window.scrollTo(0, 1000000);//先滚动到最底部,再用scrollY得到当前的值,必须延迟 否则拿到的就是1000000
                    setTimeout(function(){
                        window.scrollTo(0, window.scrollY - 45);//45像素 所有浏览器都是这么高
                    }, 50)
                } else {//其他浏览器
                    window.scrollTo(0, 1000000);
                    // window.scrollTo(0, ++this.scrollNum);
                }
            }, 200);
        },
<div class="header" id="header">会话问诊</div>
<div class="body" id="body"></div>
<div class="footer" id="footer">
     <input type="text" id="input">
</div>
.header {
    width: 100%;
    height: 40px;  
}

.body {
   width: 100%;
   overflow: auto;
}

.footer {
    width: 100%;
    height: 30px;position: fixed; bottom:0;left:0;right:0;
}