I use below code to add options for dropdown
//HTML CODE
select(name='folist', id='folist').
//JS Code
for(var i=0;i<data.foNameArray.length;i++){
var combo = document.getElementById("folist");
option = document.createElement("option");
option.text = data.foNameArray[i];
option.value =data.foIdArray[i];
try {
combo.add(option, null); //Standard
}catch(error) {
combo.add(option); // IE only
}
}
It perfectly works.Now My doubt is how to select the value while adding like selected="selected".