HTML - select and go to URL with onchange event attribute

0 votes
added Apr 2, 2019 in HTML by LC Marshal Captain (25,790 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="">Parent website</option>
</select> - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.