Mu güenas Daz
te pongo un ejemplillo simple que creo te servirá
Código:
<script type="text/javascript">
<!--
var maxi = 4;
function validarCheck(f){
cont = 0;
for(m=0; m<f.pepe.length; m++){
f.pepe[m].checked?cont++ : cont = cont;
}
if(cont > maxi){
alert("Sólo puede elegir hasta " + maxi + " noticias secundarias\nDesmarque una de las 4 actualmente seleccionadas para poder marcar ésta.");
return false
}
}
//-->
</script>
</head>
<body>
<form name="form1" id="form1" method="post" action="javascript:alert('me envio')" onsubmit="return validarCheck(this)">
<input type="checkbox" name="pepe" value="checkbox" />
<input type="checkbox" name="pepe" value="checkbox" />
<input type="checkbox" name="pepe" value="checkbox" />
<input type="checkbox" name="pepe" value="checkbox" />
<input type="checkbox" name="pepe" value="checkbox" />
<input type="submit" name="Submit" value="Enviar" />
</form>
</body>