codingtcher.com
Theme Night
Home
Login

Javascript select onchange get value

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

//select onchange get value jquery
$('#the_id_select').on('change', function() {
  alert( this.value );
});

//or

$("#the_id_select").change(function(){
   alert( this.value );
});

Related Code