How do I change selected value of select2 dropdown with JqGrid?

后端 未结 16 988
遥遥无期
遥遥无期 2020-11-27 10:27

I\'m using Oleg\'s select2 demo, but I am wondering whether it would be possible to change the currently selected value in the dropdown menu.

For example, if the fou

16条回答
  •  悲&欢浪女
    2020-11-27 10:46

    if you want to select a single value then use $('#select').val(1).change()

    if you want to select multiple values then set value in array so you can use this code $('#select').val([1,2,3]).change()

提交回复
热议问题