如何在此国家/地区下拉列表中选择多个值
这是我的代码:
function print_country(country_id) {
// given the id of the <select> tag as function argument, it inserts <option> tags
var option_str = document.getElementById(country_id);
option_str.length = 0;
option_str.options[0] = new Option('Select Country', '');
option_str.selectedIndex = 0;
for (var i = 0; i < country_arr.length; i++) {
option_str.options[option_str.length] = new Option(country_arr[i], country_arr[i]);
}
}
最佳答案
关于javascript - 在选择下拉列表中选择多个选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49027482/