Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/10/2010, 17:44
Avatar de _cronos2
_cronos2
Colaborador
 
Fecha de Ingreso: junio-2010
Mensajes: 2.062
Antigüedad: 13 años, 10 meses
Puntos: 310
Respuesta: checkbox cheked

Podría ser algo así:
Código Javascript:
Ver original
  1. function sel(id,boolean){
  2.  var inp=document.getElementById(id).getElementsByTagName('input');
  3.  for(i=0;i<inp.length;i++){
  4.   if(inp[i].type=='checkbox'){
  5.    inp.checked=boolean;
  6.   }
  7.  }
  8. }
Código HTML:
Ver original
  1. <input type='checkbox' onchange='sel("container",this.checked);' />Seleccionar todos
  2. <div id='container'>
  3. <!--- Aquí todos los checkbox -->
  4. </div>
Saludos (:
__________________
" Getting older’s not been on my plans
but it’s never late, it’s never late enough for me to stay. "
Cigarettes - Russian Red