*數組a,下拉選擇框id爲select1
清空option 只保留第一個
$("#select1").find("option").not(":first").remove()
或者
$("#select1").find("option:not(:first)").remove();
或者
$("#select1 option:not(:first)").remove();
遍歷數組 新增option
for(var i=0;i<a.length;i++){
$("#select1").append("<option value='"+a[i]+"'>"+a[i]+"</option>");
}