Creo una select in modo dinamico pescando i valori delle option da un array javascript
window.onload = function () {
var select = document.getElementById("squadre");
var squadre = new Array("Juventus", "Milan", "Inter", "Napoli", "Lazio", "Roma");
for (var i = 0; i < squadre.length; i++) {
select.options[select.options.length] = new Option(squadre[i], i);
}
}
codice html
<select id="squadre" name="squadre"></select>