Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

197
Vistas
Is there any way I can navigate to a link using options in html using JavaScript?

I created a list of options using html and placed a button beneath it...I want the user to select an option and when he clicks on the button,it redirects him to a different page... Is there anyway that I can do this using JavaScript please?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Yes, window.location.href = "/someLocation" just is made for you.

about 4 years ago · Juan Pablo Isaza Denunciar

0

when you click in the button you can call a function and inside of this function you put window.location.href = "your-url" or you can use window.open("your-url") to open a new tab.

<select onChange="goToPage(value)">
  <option disabled selected value> -- select an option -- </option>
  <option value="https://google.com" > google </option>
  <option value="https://stackoverflow.com" > stackOverflw </option>
  <option value="https://github.com" > git </option>
</select> 
 
<script>
  function goToPage(value) {
    window.location.href = value
  }
</script>

you an see more in this link here

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda