get selected value of dropdown in jquery on change – How to Get the Value of Selected Option in a Select Box Using jQuery?

get selected value of dropdown in jquery on change: Use the jQuery :selected Selector. it’s easy to get selected text from a drop-down list.

get selected value of dropdown in jquery on change

You can use the jQuery :selected selector in combination with the val() method to find the selected option value in a select box or dropdown list.

$(".sel").change(function(){

    var results = $(this).val();

    alert(results);

});

it is easy to writing one line of code to change the selected value from a drop-down list.

Read Also:  How to allow only 10 digit number validation in Jquery Example?

Jquery Get Selected Dropdown Value on Change Event Example

index.html

<!DOCTYPE html>
<html>
<head>
   <title>Jquery Get Selected Dropdown Value on Change Event Example - www.pakainfo.com</title>
   <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
</head>
<body>
   
<h3>Jquery Get Selected Dropdown Value on Change Event Example</h3>
   
<select name="blogspot" class="sel">
    <option>--Select blogger--</option>
    <option value="pk">www.pakainfo.com</option>
    <option value="ik">infinityknow.com</option>
    <option value="w3">w3diy.com</option>
</select>
   
<script type="text/javascript">
    $(".sel").change(function(){
        var results = $(this).val();
        alert(selVresultsalue);
    });
</script>
   
</body>
</html>

Don’t Miss : JQuery Get Dropdownlist Selected Value Onchange Event

I hope you get an idea about get selected value of dropdown in jquery on change.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.