Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

HTML - select and go to URL with onchange event attribute

0 votes
15 views
added Apr 2 in HTML by LC Marshal Captain (22,730 points)
<select class="form-control" onchange="location = this.value;"> 
    <option selected="" value="" disabled>Select years</option>
    <option value="year-2019">2019</option>
    <option value="year-2018">2018</option>
    <option value="year-2017">2017</option> 
    <option value="https://lazacode.org">Parent website</option>
</select>

 

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...