Ver Mensaje Individual
  #7 (permalink)  
Antiguo 09/03/2005, 11:22
Avatar de KarlanKas
KarlanKas
Moderador extraterrestre
 
Fecha de Ingreso: diciembre-2001
Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 22 años, 5 meses
Puntos: 61

La próxima vez avisa cómo lo quieres.

Código PHP:
<html>
<
head>
<
title>Untitled</title><script>

c=0;
function 
prueba(esto){
c+=(esto.checked)?1:-1;
if(
c>1){
alert("No chequee más de uno!");
esto.checked=false;
c-=1;
}

}

</script> 
</head>

<body>
<form action ="javascript:alert('Mandandooo!!!')" name="aa323" >
<input type="checkbox" name="pedpe1" onclick="prueba(this)"><br />
<input type="checkbox" name="pedpe2" onclick="prueba(this)"><br />
<input type="checkbox" name="pedpe3" onclick="prueba(this)"><br />
<input type="checkbox" name="pedpe4" onclick="prueba(this)"><br />
<input type="checkbox" name="pedpe5" onclick="prueba(this)"><br />

<input type="submit" name="pepe"></form>


</body>
</html> 
__________________
Cómo escribir

No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia.