Ver Mensaje Individual
  #4 (permalink)  
Antiguo 26/05/2006, 18:22
Avatar de Cap.Buscapina
Cap.Buscapina
 
Fecha de Ingreso: octubre-2004
Ubicación: Argentina
Mensajes: 836
Antigüedad: 19 años, 7 meses
Puntos: 4
Cita:
<html>
<head>
<script>
function validar(f){
todos=document.getElementsByTagName('input');
for(x=0;x<todos.length;x++){
if(todos[x].checked){
return true;
}
}
alert("Al menos debes marcar 1");
return false;
}

</script>
</head>
<body >
<form onSubmit="return validar(this)">
<p>
<input type="checkbox" name="checkbox" value="checkbox">
a</p>
<p>
<input type="checkbox" name="checkbox2" value="checkbox">
b</p>
<p>
<input type="checkbox" name="checkbox3" value="checkbox">
c</p>
<p>
<input type="checkbox" name="checkbox4" value="checkbox">
d</p>
<p>
<input type="checkbox" name="checkbox5" value="checkbox">
e </p>
<input type="submit" value="enviar">
</form>
</body>
</html>

espero te sirva.

saludos
__________________
by Capitán Buscapina
.