Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/06/2010, 08:09
kokoou
 
Fecha de Ingreso: enero-2008
Ubicación: Buenos Aires
Mensajes: 305
Antigüedad: 16 años, 3 meses
Puntos: 14
Respuesta: Cómo tomo el valor de un grupo de checkbox en jQuery?

Código Javascript:
Ver original
  1. <script type="text/javascript">
  2. $(document).ready(function(){
  3.         var seleccionadas = new Array();
  4.         var indice = 0;
  5.     $('.checkbox').each(function(){
  6.         if( this.attr('checked'){
  7.                     indice = indice + 1; // o indice++; no recuerdo si es así en js
  8.                     seleccionadas[indice] = this.val();
  9.                 }
  10.     });
  11. });
  12. </script>