javascript trigger select change code example
Example 1: select option trigger in js
<select id="sel" onchange='alert("changed")'>
<option value='1'>One</option>
<option value='2'>Two</option>
<option value='3' selected>Three</option>
</select>
var select = document.querySelector('#sel'),
input = document.querySelector('input[type="button"]');
select.addEventListener('change',function(){
alert('Yare yare daze');
});
Example 2: trigger change select element jquery
$('#selectField').val(10).trigger('change');
or
$('#selectField').val(10).change();