I'm having some trouble with my dropdown list code. My goal is to be able to select an option from the list and have it display an image with some text, but I seem to be missing something. Here's what I have so far:
<form action="">
<select id="cars">
<option value="1" href="https://i.imgur.com/sXWdODh.jpg">Ford Mustang</option>
<option value="2">Mercedes E400</option>
<option value="3">Chevy Camaro SS</option>
<option value="4">Honda Civic</option>
<option value="5">Tesla Model X</option>
</select>
</form>
<br>
<button type="button" onclick="showcars()">Submit</button>
<button type="button" onclick="myFunction()">Reset</button>
<script>
function showcars(){
var select = document.getElementById("cars");
var carName = select.value;
document.write(carame);
}
</script>
<script>
function myFunction() {
document.getElementById("2").value = "honda";
}
document.getElementById("1").src = "fordmustang";
</script>
</body>
</center>
<br>
<br>
</html>