Okay, I have this code:
You need to add an id to your select. Then:
$('#selectorID').val()
$('#selectorID').val();
OR
$('select[name=selector]').val();
OR
$('.class_nam').val();
$(document ).ready(function() {
$('select[name=selectorname]').change(function() {
alert($(this).val());});
});
I just wanted to share my experience
For me,
$('#selectorId').val()
returned null.
I had to use
$('#selectorId option:selected').val()
you can use jquery
as follows
SCRIPT
$('#IDOfyourdropdown').change(function(){
alert($(this).val());
});
FIDDLE is here
$('select').change(function() {
console.log($(this).val())
});
jsFiddle example
.val()
will get the value.