📜  javascript select change selected - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:20.561000             🧑  作者: Mango

代码示例2
const options = Array.from(select.options);
options.forEach((option, i) => {
  if (option.value === use_id) select.selectedIndex = i;
});