Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/10/2004, 09:20
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 2 meses
Puntos: 772
Hola khepper y caricatos.

Otra forma de hacerlo, jugando con el DOM:
Código HTML:
<html>
<head>
<script>
function marcar(obj,chk) {
	elem=obj.getElementsByTagName('input');
  for(i=0;i<elem.length;i++)
  	elem[i].checked=chk.checked;
}
</script>
</head>
<body>
<form>
<div>
<input type="checkbox" onclick="marcar(this.parentNode,this)" />
<input type="checkbox" />
<input type="checkbox" />
<input type="checkbox" />
</div>
<div>
<input type="checkbox" onclick="marcar(this.parentNode,this)" />
<input type="checkbox" />
<input type="checkbox" />
<input type="checkbox" />
</div>
<form>
</body>
</html> 
Saludos,