📜  select2 预选选项 - Javascript 代码示例

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

代码示例1
$('#mySelect2').val('1'); // Select the option with a value of '1'
$('#mySelect2').trigger('change'); // Notify any JS components that the value changed