Get dropdown selected value in jQuery

$('selector').val() returns the selected value of a dropdown. If you want to get the selected value of a drowpdown on its change event you have to use only $(this).val()

You can also get the text of dropdown by using below code.

$(".ddlCountry option:selected").text()

<!DOCTYPE html>
  <title>jQuery With Example</title>
  <script src="" type="text/javascript"></script>
  <script type="text/javascript">
    $(function () {
      $('.btnClick').click(function () {
        alert('Value = ' + $('.ddlCountry').val());
        alert('Text = ' + $('.ddlCountry option:selected').text());

      $('.ddlCountry').change(function () {

    <select class="ddlCountry">
      <option value="1">India</option>
      <option value="2">Japan</option>
      <option value="3">England</option>
    <br /><br />
    <input type="button" class="btnClick Button" value="Click" />

1 comment :