![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
08/03/2007, 07:04
|
![Avatar de JavierB](http://static.forosdelweb.com/customavatars/avatar16568_12.gif) | Colaborador | | Fecha de Ingreso: febrero-2002 Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 23 años Puntos: 772 | |
Re: Checkbox y javascript Hola fremeto. Bienvenido al foro.
Pon así el checkbox:
Código:
<input name="c1" type="checkbox" id="c1" value="checkbox" onclick="chequea(this)" />
y utiliza este código:
Código:
function chequea(obj) {
for (i=0; ele=obj.form.elements[i]; i++)
if (ele.type=='checkbox')
ele.checked = obj.checked;
}
Saludos, |