Tema: Interuptor
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/03/2006, 05:02
Avatar de dogduck
dogduck
 
Fecha de Ingreso: enero-2006
Ubicación: ¿Atlantida, Hesperides, Islas afortunadas?
Mensajes: 2.231
Antigüedad: 18 años, 4 meses
Puntos: 19
Mira a ver si te vale esto
Código HTML:
<html>

<head>
<title>Interruptor</title>
<script>
var n=0
function interruptor(){
n++;
if(n%2==0){return "1";} else return "0";
}
</script>
</head>

<body>

<p><a href=# onclick="alert(interruptor())">Un enlace</a></p>

</body>

</html>