1<select id="lang" >
2 <option value="1">php</option>
3 <option value="2">asp</option>
4 <option value="3">java</option>
5</select>
6
7<script>
8 $("#lang").select2().select2('val','1');
9</script>
1$('#mySelect').select2({
2 data: ['one','two'],
3 tags: true
4});
5$('#mySelect').val(['one','two']).trigger('change')