You can test the solution here https://jsfiddle.net/2pz9se0q/3/
HTML
<select class="selecttype" id="cars">
<optgroup label="RENAULT">
<option data-href="mylink1" value="euro1">
Renault Euro 3
</option>
<option data-href="mylink2" value="euro2">
Renault Euro 4
</option>
</optgroup>
</select>
<button class="buttonsea" type="submit" onclick="btnclick()">Search</button>
Note:
1- that I deleted the id="euro", you can not give the same id to many tags
2- option group most be closed by </optgroup>
js
function btnclick() {
let cars = document.getElementById('cars');
let selectedCar = cars.options[cars.selectedIndex];
let link = selectedCar.getAttribute('data-href');
window.open(link, '_blank');
}
Description:
when you click the button the function btnclick() will be fired.
this function will get the element with id cars.
from the element options, it will take the selected option only and save it on selectedCar
by using the element selectedCar we can access the data-href attribute and take the link
to open the link on a new window we added '_blank'
Value Description
_blank Opens the linked document in a new window or tab
_self Opens the linked document in the same frame as it was clicked (this is default)
_parent Opens the linked document in the parent frame
_top Opens the linked document in the full body of the window