Ver Mensaje Individual
  #13 (permalink)  
Antiguo 07/07/2015, 11:13
Avatar de chronos682
chronos682
 
Fecha de Ingreso: febrero-2004
Ubicación: Tunja - Boyacá - Colombia
Mensajes: 627
Antigüedad: 20 años, 2 meses
Puntos: 69
Respuesta: duda en poder insertar varios link url

Con este código es más fácil:

Código HTML:
Ver original
  1.     <head>
  2.         <title>Prueba</title>
  3.         <script>
  4.             function AddLink()
  5.             {
  6.                 var newdiv = document.createElement('div');
  7.                 newdiv.innerHTML = "Link: <input type='text' name='vinc[]'><br>";
  8.                 document.getElementById('vinculos').appendChild(newdiv);
  9.             }
  10.         </script>
  11.     </head>
  12.     <body>
  13.         <form>
  14.             <div id="vinculos">
  15.                 Link: <input type="text" name="vinc[]"><br>
  16.             </div>
  17.             <br><br>
  18.             <input type="button" value="Add link" onclick="AddLink();">
  19.         </form>
  20.     </body>
  21. </html>

Al final de la página creas un botón tipo submit y con POST recoges los valores de todos los campos vinc que se hayan creado.
__________________
Si te gustó la respuesta dale +1

HERNÁN G. SIABATO M.
[email protected]