不需要那么多函数
<form action="" method="post" name="form1" >
  <textarea name="textfield" onKeyUp="document.form2('单行文本1').value = this.value"></textarea>
</form>
<form name="form2" method="post" action="">
  <textarea name="textarea" id=单行文本1></textarea>
</form>

解决方案 »

  1.   

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }function MM_changeProp(objName,x,theProp,theValue) { //v6.0
      var obj = MM_findObj(objName);
      alert(theValue);
      if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
        if (theValue == true || theValue == false)
          eval(obj.id+"."+theProp+"="+theValue);
        else eval("document.all('"+obj.id+"')."+theProp+"='"+theValue+"'");
      }
    }
    //-->
    </script>
    </head><body>
    <form action="" method="post" name="form1" >
      <textarea name="textfield" onKeyUp="MM_changeProp('xx','','value',this.value)"></textarea>
    </form>
    <form name="form2" method="post" action="">
      <textarea name="textarea" id=xx></textarea>
    </form>
    </body>
    </html>