Ver Mensaje Individual
  #10 (permalink)  
Antiguo 07/07/2010, 08:50
Dany_s
 
Fecha de Ingreso: diciembre-2009
Ubicación: Misiones
Mensajes: 867
Antigüedad: 14 años, 5 meses
Puntos: 65
Respuesta: envio de datos formulario a php con jquery

formo el query string con los input que tienen clase "serializar", el input apellido no lo tiene


Código Javascript:
Ver original
  1. <head>
  2. <title>Prueba</title>
  3. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
  4. <script>
  5. $(function(){
  6.     $('#ver').click( function (){
  7.         alert( $(".serializar").serialize() );
  8.     });
  9. });
  10. </script>
  11. </head>
  12. <body>
  13.     Nombre <input type="text" class="serializar" name="nombre" value="" />
  14.     Apellido <input type="text" name="apellido" value="" /><br />
  15.     M: <input type="radio" class="serializar" name="sexo" value="M"> F:<input type="radio" class="serializar" name="sexo" value="F"><br />
  16.  
  17.     <a href="#" id="ver">ver</a>
  18. </body>
  19. </html>