1
<!DOCTYPE html>
<html>
<body>
<select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="vw">VW</option>
<option value="audi" selected>Audi</option>
</select>
</body>
</html>
What javascript command can I use to get the position of the currently selected element in this "list" of options? Example: Volvo = 0 (as it is the first on the list, so I imagine it to be 0), Saab = 1.
sorry, I made an edit. it’s about the element that is currently selected. Example: by default is the Audi, so if I do not change anything, must return 0 which is your position
– Dr.G
Ok! Updated response
– Sam