<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style>
div#content{
border:1px solid black;
overflow:auto;
width:400px;
height:200px;
}
</style>
<script>
var send = function(){
content.innerHTML += txt.value + "<br />";
content.scrollTop = content.scrollHeight;
}
</script>
<title>RunJS 演示代码</title>
</head>
<body>
<div id='content'>
</div>
<br />
<input type="text" id="txt" />
<button onclick="send()">
发送
</button>
</body>
</html>
追问如果是替换原来的内容呢