I have the following in the page
Apple Cars
Give an id for the select object like this:
Apple Cars Honda Fiat Indigo
You can do it in pure JavaScript:
var selectobject = document.getElementById("mySelect"); for (var i=0; i
But - as the other answers suggest - it's a lot easier to use jQuery or some other JS library.