Hola, netorres.
Solo han pasado 20 minutos entre tus dos mensajes. Tienes que tener un poco más de paciencia.
Prueba esto:
Código PHP:
<html>
<head>
<script>
function validar(frm) {
contador=0;
for(i=0;i<frm.elements.length;i++)
if(frm.elements[i].type=="checkbox")
if(frm.elements[i].checked)
contador++
if(contador==0)
alert('No has marcado nada');
}
</script>
</head>
<body>
<form name="frm">
<input type="checkbox" />
<input type="checkbox" />
<input type="checkbox" />
<input type="button" onclick="validar(this.form)" />
</form>
</body>
</html>
Saludos,