dejo el codigo
Código HTML:
<script language="javascript"> function verifica(){ document.form.txa.value=txt1; var txt1=document.getElementById('t1').value; } </script> <body> <form name="form" id="form" method="post" action=""> <INPUT NAME="nombre" MAXLENGTH="35" size="35" TYPE="TEXT" VALUE="" id="t1"> <INPUT NAME="validar" TYPE="submit" VALUE="Ver codigo" onClick="javascript:verifica()"> <TEXTAREA NAME="txa" readonly ROWS=5 COLS=74 id="txa"> </body>