yes, that's what i think the code is supposed to do.
it chooses the right select field by its id
Code:
var select= document.getElementById('s1');
it checks the number of items
Code:
var items = select.getElementsByTagName('option');
picks a random number of option
Code:
var index= Math.floor(Math.random() * items.length);
and makes the option by this number selected
Code:
select.selectedIndex = index;
in separation from the rest of the code, it works as expected.
but in combination, there is always either ford or chevrolet, i.e. the first options selected. considering that the alerted random numbers vary, this part of the code gives no effect.