Jump to content

Bryan Somto

Members
  • Posts

    1
  • Joined

  • Last visited

Bryan Somto's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. https://www.w3schools.com/howto/howto_custom_select.asp The link above is a custom select dropdown. I'm trying to get each item in the dropdown go to a link. I've tried using; <body> Please select city : <select name="select-city" onchange="location = this.value;"> <option value="">Select-City</option> <option value="https://en.wikipedia.org/wiki/New_Delhi">New Delhi</option> <option value="https://en.wikipedia.org/wiki/New_York">New York</option> <option value="https://en.wikipedia.org/wiki/Bern">Bern</option> <option value="https://en.wikipedia.org/wiki/Beijing">Beijing</option> </select> </body> And this, <select name="formal" onchange="javascript:handleSelect(this)"> <option value="home.com">Home</option> <option value="https://www.Facebook.com">Contact</option> </select> <script type="text/javascript"> function handleSelect(elm) { window.location = elm.value; } </script>
×
×
  • Create New...