soldierjesus:
Este ejemplo es muy genérico, porque hace que cualquier opción del select desmarque todos los checkbox (en caso de que tuvieses más de uno)
Habría que ajustarla para algo más preciso
Código HTML:
Ver original<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="copyright" content="© 2006, Guillermo Gianello" xml:lang="es" lang="es" /> <meta name="author" content="http://emprear.com" xml:lang="es" lang="es" />
<script type="text/javascript"> //<![CDATA[
function des(){
var cbv = document.form1.dia.value;
var i = "";
for (i=0;i<document.form1.elements.length;i++){
if(cbv != ""){
document.form1.elements[i].checked=0
}
}
}
//]]>
<p>Cambiar estado checkbox a través de select onchange
</p> <form method="post" action="#" name="form1"> <select name="desmarcar" onchange="des();"> lunes
<input type="checkbox" name="dia" checked="checked" value="lunes"/>martes
<input type="checkbox" name="dia" value="martes" checked="checked" /><input type="submit" value="enviar" /> <!-- ©2000 Emprear.com -->
demo
http://foros.emprear.com/html/sniper/select-cb.html
Saludos