Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/11/2011, 06:52
quimfv
Colaborador
 
Fecha de Ingreso: marzo-2008
Ubicación: Sabadell
Mensajes: 4.897
Antigüedad: 17 años
Puntos: 574
Respuesta: como se puede escribir en un div para que funcione como formulario

Que el usuario escriba en el div?

Un textarea no te sirve....


Código MySQL:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2.     <html xmlns="http://www.w3.org/1999/xhtml">
  3.    
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Documento sin t&iacute;tulo</title>
  7. <style type="text/css">
  8.     <!--
  9.     a {
  10.         background-color: #00CCFF;
  11.         height: 300px;
  12.         width: 300px;
  13.     }
  14. p {
  15.     background-color: #CCCCCC;
  16. }  
  17. #recibe{
  18. color:#ff0000;
  19. }
  20.  -->
  21.     </style>
  22. <script type="text/javascript">
  23.     function recibir_datos() {
  24.     document.getElementById('recibe').innerHTML=document.getElementById('mandar').value;
  25.     }
  26.     </script>
  27.  
  28. </head>
  29.     <body><textarea id="mandar" name="mandar" cols="15" rows="10">escribe datos</textarea>
  30.       <p onclick="recibir_datos()"> este es un boton  </p>
  31.     <div id="recibe"></div>
  32.     </body>
  33.     </html>
__________________
Quim
--------------------------------------------------
Ayudar a ayudar es una buena práctica!!! Y da buenos resultados.