Ver Mensaje Individual
  #2 (permalink)  
Antiguo 31/01/2007, 06:37
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
Re: Seleccionar unos checkbox concretos

Hola Ascariz

Prueba este ejemplo:

Código PHP:
<html>
<
head>
<
script type="text/javascript">
function 
marcar(valor) {
  for (
i=0ele document.forms[0].elements[i]; i++)
    if (
ele.type=='checkbox')
      
ele.checked = (ele.value==valor);
}
</script>
</head>
<body>
<form>
<select onchange="marcar(this.value)">
<option value="uno">Uno</value>
<option value="dos">Dos</value>
</select>
<input type="checkbox" value="uno" />
<input type="checkbox" value="uno" />
<input type="checkbox" value="dos" />
<input type="checkbox" value="dos" />
</form>
</body>
</html> 
Saludos,