<select id="bethorse">
<option value="horse1">White</option>
<option value="horse2">Blue</option>
<option value="horse3">Green</option>
<option value="horse4">Brown</option>
</select>
S searched but the answers were for the selected text and I used this code bethorse= document.getElementById('bethorse').value;
. It gives me number of the position the test. For example value 3 for horse4 just like in array.