Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

194
Views
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 answers
Answer question

0

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

about 4 years ago · Juan Pablo Isaza Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!