Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/03/2016, 20:40
xerifandtomas
 
Fecha de Ingreso: octubre-2010
Ubicación: España
Mensajes: 1.007
Antigüedad: 13 años, 6 meses
Puntos: 123
Respuesta: Envio de array input con ajax a php

Esto es más del foro de js.

Código HTML:
Ver original
  1. <form class="" action="" id="myForm">
  2.     uno  <input type="text" name="nombre[]" value="">
  3.       dos <input type="text" name="nombre[]" value="">
  4.       tres <input type="text" name="nombre[]" value="">
  5.     </form>
  6.     <input type="submit" name="name" value="click" id="algo">
  7.     <div id="aqui"> </div>

Código Javascript:
Ver original
  1. $(document).ready(function(){
  2.       $('#algo').on('click', function(){
  3.         var url = "recibe.php";
  4.         var form= $('#myForm');
  5. $.ajax({
  6.   type: "POST",
  7.   data: form.serialize(),
  8.   success:function(msj){
  9.     $('#aqui').html(msj);
  10.   }
  11. })
  12.       });
  13.     });