Skip to content
Related Articles
Get the best out of our app
Open App

Related Articles

How to get selected option from Dropdown in jQuery ?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

In this article, we learn how to get the selected option from the dropdown list. This article requires some familiarity with HTML, CSS, JavaScript, and jQuery. We can solve this challenge by using the jQuery val() method.

The val() method in jQuery is used to set or return the value of an attribute for the selected elements. This method applies to the HTML form elements.


$(selector).val()   // or
$(selector).val(value)  // or
$(selector).val(function(index, current_value))

This method returns the selected element with specified changes made by val() method.

Example: In this example, we will select an option from the dropdown menu using jQuery.


        How to get selected option from
        Dropdown list using jQuery?
    <link href=
    <script src=
<body style="border: 2px solid green; min-height: 240px;">
    <div style="display: flex; justify-content: center;">
        <h1 style="color:green;">
    <select class="form-select mx-auto"
            aria-label="Default select example"
            style="width: 200px; margin-top: 20px;"
        <option selected>Select Language</option>
    <div id="show" style="display: flex;
         justify-content: center; margin-top: 20px;">
    $('#lang').on('input', function () {



How does it work?

Whenever you select an item from the dropdown, it will show below the dropdown at the same time.

My Personal Notes arrow_drop_up
Last Updated : 15 May, 2023
Like Article
Save Article
Similar Reads
Related Tutorials