📜  js 选择更改值 - Javascript 代码示例

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

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