How to get value from select option

Pinterest LinkedIn Tumblr

With JQuery, we can get easily select option value onchange event in jquery. if you have a question like how to get select option value on change jquery than here you will have a simple example of getting selected value of dropdown in jquery on change event.

In Jquery, we can get value from a selected value using onchange event in jquery. just click on the value you can easily get the value.

In this example, I am using onchange event. you can check from below code.


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



So, let’s see bellow simple example so it will helpful for you.


<!DOCTYPE html>
   <title>Get Selected value from drop using jqery: Real Programmer</title>
   <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<h3>Get Selected value from drop using jqery</h3>
<select name="webste" class="getvalue">
    <option>Select Course</option>
    <option value="java">Java</option>
    <option value="nodejs">Node Js</option>
    <option value="PHP">PHP</option>
<script type="text/javascript">
        var selValue = $(this).val();

Write A Comment