Ver Mensaje Individual
  #2 (permalink)  
Antiguo 20/04/2014, 18:16
Avatar de Djoaq
Djoaq
 
Fecha de Ingreso: septiembre-2012
Ubicación: Barcelona
Mensajes: 271
Antigüedad: 11 años, 7 meses
Puntos: 38
Respuesta: seleccionar un radio buttons y crear a la vez inputs text

Yo te recomendaría que usaras Jquery ... y que busques algún manual básico y sencillo ... merece la pena es muy potente y muy muy fácil de aprender! te pego el código que necesitas!

Código Javascript:
Ver original
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4.   <meta charset="utf-8">
  5.   <title>Ejemplo Funcionalidad Jquery</title>
  6. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
  7. </head>
  8. <body>
  9.    
  10. <script>
  11. $(document).ready(function(){
  12.     var areatexto = '<input type="textarea"/>';
  13.    
  14.     $("#uno").click(function(){
  15.         $("#textarea").html(areatexto);
  16.     });
  17.     $("#dos").click(function(){
  18.         $("#textarea").html(areatexto+areatexto);
  19.     });
  20.     $("#tres").click(function(){
  21.         $("#textarea").html(areatexto+areatexto+areatexto);
  22.     });
  23. });
  24. </script>
  25.  
  26. <input type="radio" name="element" id="uno" value="uno"> 1</input>
  27. <input type="radio" name="element" id="dos" value="dos"> 2</input>
  28. <input type="radio" name="element" id="tres" value="tres">3</input>
  29. <div id="textarea"></div>
  30.  </body>
  31. </html>

Saludos!
Espero haberte ayudado!