标记下,总结下经验
select清空option
1 document.getElementById("type").options.length = 0;
select创建option
1
2 function addOption(objSelect,optionVal,optionText) {
3 var _o = document.createElement("option");
4 _o.text = optionText;
5 _o.value = optionVal;
6 objSelect.add(_o);
7 }
8