更新时间:2023-08-17 16:03:46
本教程准确显示了您需要执行的操作:使用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');