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

JS - Select and target blank with window.open

0 votes
8 views
added Apr 3 in Javascript by LC Marshal Lieutenant (18,470 points)
// window.open for target blank
<select id="select-years" onchange="window.open(this.value)"> 
    <option selected="" value="" disabled>Select years</option>
    <option value="year2019" >2019</option>
    <option value="year2018">2018</option> 
    <option value="https://lazacode.org">External ste</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.
...