jsp textarea

<html>
<head>
<title>aaaaa</title>
<script>
function sendTo()
{
     if(a2.innerText==""){
          a2.innerText=a1.innerText;
    }
     else
   {
         a2.innerText +="\n"+a1.innerText;
   }
 a1.innerText  = "";
}
</script>
</head>

<body>
<textarea id="a1">sdfsdfsdfsdfsdfd</textarea>
<textarea id="a2"></textarea>
<br />
<input type="button" value="发送" onclick="sendTo()" />
<body>
</html>

你可能感兴趣的:(textarea)