codice:
var s = ["<select>"];
for(var i = 0, j = vettore.length; i < j; i++)
s.push("<option>", vettore[i], "</option>");
s.push("</select>");
elemento.innerHTML = s.join("");
P.S. la StringBuilder per JS l'hanno già fatta ma secondo me non serve a molto ...
[edit]
in C# non faresti la stessa cosa così ?
codice:
System.StringBuilder s = new System.StringBuilder("<select>");
for(System.Int32 i = 0, System.Int32 j = vettore.Length; i < j; i++)
s.Append("<option>", vettore[i], "</option>");
s.Append("</select>");
:master: