更新时间:2023-08-17 16:26:04
本教程准确显示了你需要做什么:使用javascript 向HTML选择框添加选项
This tutorial shows exactly what you need to do: Add options to an HTML select box with javascript
基本上:
daySelect = document.getElementById('daySelect');
daySelect.options[daySelect.options.length] = new Option('Text 1', 'Value1');