Ver Mensaje Individual
  #2 (permalink)  
Antiguo 26/04/2007, 07:30
Avatar de ZiTAL
ZiTAL
 
Fecha de Ingreso: marzo-2004
Ubicación: Bermio (Bizkaia)
Mensajes: 1.545
Antigüedad: 21 años
Puntos: 62
Re: Ayuda con codigo javascript, ya no se que hacer!!

Código HTML:
<html>
<head>
<script type="text/javascript">
 function juen(id)
  {
    id=document.getElementById(id).value;
    id=parseInt(id);
    // menor que 10
    if(id<=10)
     {
       location.href="http://www.google.com/";
       // window.open('http://www.google.com/');
     }
    // entre 10 y 20
    else if(id>10 && id<=20) // entre 11 y 20
     {
       location.href="http://www.forosdelweb.com/";
       // window.open('http://www.forosdelweb.com/');       
     }
    else // todas las demas
     {
       location.href="http://www.programame.net/";
	   // window.open('http://www.programame.net/');              
     }
  }
</script>
</head>
<body>
<input type="text" id="valor" />
<input type="button" value="go" onclick="juen('valor')" />
</body>
</html> 
si quieres que te habra en otra ventana pon el location en comentario y quita las barras del window.open

;)

espero que te sirva.
__________________
http://zital.no-ip.org
____________________

Euskerie ahuen eta bijotzan