JQuery get drop-down box selected value
How to get user selected value in the drop down box/combo box.Here tested easy best methods to get combo box value.
$("#DropDownID option:selected").val();
// or
$("#DropDownID :selected").val();
If you want to get selected text that can be get like this.
$("#DropDownID option:selected").text();
// or
$("#DropDownID :selected").text();
Also you can get this method.This is the fastest method.
$("#DropDownID").children("option").is("selected").val();
//Simply
$("#DropDownID").val();
This is also working.
$('#DropDownID').find('option:selected').val();
What's your reaction?
Excited
0
Happy
0
In Love
0
Not Sure
0
Silly
0





