我的 textarea 及其所有属性都是正确的,但我的 javascript 不正确无法设置 oTextbox3 的值。
<html>
  <head>
    <title>Retrieving a Textbox Value Example</title>
  </head>
  <body> 
    <textarea rows="5" cols="25" name="txt2"></textarea> <br /> <textarea rows="5"  cols="25" name="txt3"></textarea>
    <br />
    <input type="button" value="Set Values" onclick="setValues()" />
    <script type="text/javascript">
      function setValues() { 
      var oTextbox2= document.getElementById("txt2");
      oTextbox2 = oTextbox2.value; oTextbox2 = oTextbox2.split(" ");
      oTextbox2 = oTextbox2.sort();
      var oTextbox3 = document.getElementById("txt3"); 
      oTextbox3.value = oTextbox2;
      } 
    </script>
  </body>
</html>