onchange event in jquery for dropdown example

Example 1: .on change get value

$('select').on('change', function() {
  alert( this.value );
});

Example 2: value change event jquery

$("#input").change(function(){
  alert("The text has been changed.");
});

Example 3: js select on change value

document.getElementById('my-select').addEventListener('change', function() {
  console.log('You selected: ', this.value);
});

Example 4: dropdown option selection change event in jquery

$("select [name='element_name']").change(function(){
	// condition goes here
});

Example 5: on change jquery

$("input").change(function(){
  alert("The text has been changed.");
});

Example 6: javascript input value change

function updateInput(ish){
    document.getElementById("fieldname").value = ish;
}