<
script>
function marcar(p,f){
for(ii=0;n=f.elements[ii];ii++){
if(n.type=="checkbox")n.checked=p
}
}
<
/script>
<
body> <
form id="form1" name="form1" method="post" action="">
<
input name="uno" type="checkbox" id="uno" value="checkbox" /<
uno
<
br/> <
input name="dos" type="checkbox" id="dos" value="checkbox" />dos
<
br/> <
input name="tres" type="checkbox" id="tres" value="checkbox" />tres
<
br /> <
input name="cuatro" type="checkbox" id="cuatro" value="checkbox" />cuatro
<
br /> <
input type="button" name="Submit" value="todos" onclick="marcar(1,this.form)" />
<
input type="button" name="Submit2" value="ninguno" onclick="marcar(0,this.form)" /> <
/form> <
/body>
No hay comentarios:
Publicar un comentario