Get the value of select tag jQuery
jquery
Solution
Please use this one :
If you want to get text value : like Cool and Hot then ues this one
$('#sel1 option:selected').text();
If you want to get value : like 1,2 then
$('#sel1 option:selected').val();
Problem
I have a code like ``` <select id="sel1"> <option label="l1" value="1">Cool</option> <option label="l2" value="2">Hot</option> </select> ``` Now I want to get the value should be either Cool or Hot while changing the value of selected item in jQuery. I am trying by `querySource = $("#querySource").val();` but this is showing as `1` or `2`. How to do that?