Ver Mensaje Individual
  #15 (permalink)  
Antiguo 18/04/2015, 10:14
Avatar de MaNuX0218
MaNuX0218
 
Fecha de Ingreso: marzo-2014
Mensajes: 787
Antigüedad: 10 años, 1 mes
Puntos: 67
Respuesta: ¿Como envio desde un textarea pulsando enter?

No funciona por que donde le dices que se agrege el texto escrito del textarea, pruebalo así:

Código HTML:
Ver original
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2.  
  3.  
  4. <script src="http://code.jquery.com/jquery-1.11.2.min.js"></script>
  5.  
  6. <title>Page title</title>
  7. </head>
  8.  
  9. <script language="JavaScript" type="text/javascript">
  10. <!--
  11. $("#id_input").on("keyup", function(e){
  12. if (e.keyCode == 13) {
  13. $("#id_div").html($("#ID_UNPUT").val());
  14. }
  15. });
  16.  
  17. //-->
  18.  
  19. <form action="PRUEBA.php">
  20.  
  21. <input type="text" id="id_input" />
  22.  
  23. </form>
  24.  
  25. <div id="id_div"></div>
  26. </body>
  27. </html>

Te he cambiado a un input ya que es mejor para que no realice saltos de línea.

Saludos.
__________________
No te preocupes si tu código no funciona bien. Si todo lo hiciera, no tendrías trabajo.