<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
div#div1{
width:500px;
height:500px;
border:1px solid #ccc;
}
textarea#input{
width:500px;
height:100px;
border:none;
border:1px solid red;
outline:none;
}
</style>
</head>
<body>
<div id="div1"></div>
<textarea id="input"></textarea>
<button id="btn">发送</button>
<script>
var oDivShow=document.getElementById("div1");
var oInput=document.getElementById("input");
var oBtn=document.getElementById("btn");
//oInput.innerHTML="Hello!";
//var oDivInput.innerHTML="niaho";
//console.log(typeof oInput.innerHTML);
oBtn.onclick=function(){
//alert(oInput.innerHTML);
var oText=oInput.innerHTML;
function showText(){
return oDivShow.innerHTML+oText;
}
oDivShow.innerHTML=showText();
//oInput.InnerHTML="dfdf";
//console.log(showText());
}
</script>
</body>
</html>
var oText=oInput.value;
document.createElement()