Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/12/2005, 04:26
Avatar de caricatos
caricatos
Moderador
 
Fecha de Ingreso: abril-2002
Ubicación: Torremolinos (Málaga)
Mensajes: 19.607
Antigüedad: 22 años, 11 meses
Puntos: 1284
Hola:

Más o menos sería:

<fieldset id="conjunto" >
<input type="checkbox" name="check1" value="ch1" />
<input type="checkbox" name="check1" value="ch2" />
<input type="checkbox" name="check1" value="ch3" />
<input type="checkbox" name="check2" value="ch4" />
<input type="checkbox" name="check2" value="ch5" />
<input type="checkbox" name="check2" value="ch6" />

</fieldset>

<input type="checkbox" name="todos" value="todos" onclick="todos(this.checked)" />

Y en el head el script todos()...

Código:
function todos(valor) {
 for (var i = 0, total = document.getElementById("conjunto").getElementsByTagName("input"); i < total.length; i ++)
  total[i].checked = valor;
}
Saludos
__________________
Por favor:
No hagan preguntas de temas de foros en mensajes privados... no las respondo