📜  select2 on change - Javascript 代码示例

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

代码示例4
any .val() updates need to be followed by
$('#unit').val('21'); // Select the option with a value of '21'
    $('#unit').trigger('change'); // Notify any JS components that the value changed