I know that you can use the onChange method, but onChange does not start if I change the value by code, for example:
<select id='selectBox' onChange='alert("changed")'>
<option value="1">1</option>
<option value="1">2</option>
<option value="1">3</option>
<select>
<script>
$(document).ready(function() {
$('#selectBox').val('3');
});
</script>
When the document loads, I would like the message to be “changed” to a popup ... Is this possible?
source
share