I have written a code for dropdown selected index changed event at client side using onchange event and create one JavaScript function. Now, I want to retrieve selected values in this function. How can I get this value?
This will give you selected text.
$("#mydropdownid option:selected").text();
This will give you selected value
$('#mydropdownid').val();
$("#DropDownlist:selected").val();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With