SOURCE

console 命令行工具 X clear

                    
>
console
var oWords = document.getElementById('talkList');
oWords.scrollTop = oWords.scrollHeight;
// input text输入框滚动事件
$(document).on('click',"input[name=text_value]",function() {
	check_list_style();
	// $(".chat-list").height(0);
	setTimeout(function() {
	   window.scrollTo(0, $(".chat-list").height()+999)
	}, 500);
    oWords.scrollTop = oWords.scrollHeight;
});

// 根据手机软键盘监测屏幕大小
$(window).resize(function() {
	check_list_style();
	setTimeout(function() {
	   window.scrollTo(0, $(".chat-list").height()+999)
	}, 500);
}); 

// 底部与最后一个对话间距
function check_list_style()
{
	var h = parseInt($('.chat-form').get(0).offsetHeight);
	$(".chat-list").css({"margin-bottom" : h + 30 + "px"});
	// $(".chat-form").css({"margin-top" : h + 30 + "px"});
}
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>中医在线直播</title>
    <link rel="stylesheet" href="http://tester.tcmmooc.com/assets/v2/bootstrap/css/bootstrap.css?2.0.1">
 </head>
  <body>
      <div id="talkList" class="chat-list"><p style="height:900px;border:1px solid yellow">聊天内容</p></div>
<div class="chat-form"><input type="text" name="text_value"></div>
<script src="http://code.jquery.com/jquery-1.4.1.min.js"></script>

<script type="text/javascript">
    var oWords = document.getElementById('talkList');
oWords.scrollTop = oWords.scrollHeight;
</script>
  </body>
</html>
.chat-list {
    padding-bottom: 40px; 
    padding-top: 16px;
    height: 100vh;
    background: #f00;
    border-bottom:5px solid green;
    overflow: auto;
}
.chat-form {
    background-color: blue;
    /* border-top: 1px solid #dedede; */
    padding: 5px;
    position: fixed;
    bottom: 0;
    width: 100%;
    max-width: 500px;
    z-index: 88;
    /* max-height: 200px; */
    overflow-y: auto;
    overflow-x: hidden;
}

本项目引用的自定义外部资源