Answers for "how to get the value from a dropdown when selected in javascript jquery"

3

how to get the value of dropdown in jquery

BY LOVE
$('#ddlName option:selected').val();
Posted by: Guest on May-08-2020
6

get selected value of dropdown in javascript

<body>
   
   <select id="list" style="padding: 10px;" onchange="getSelectValue();">
     <option value="js">JavaScript</option>
     <option value="php">PHP</option>
     <option value="c#">Csharp</option>
     <option value="java">Java</option>
     <option value="node">Node.js</option>
   </select>
   
    <script>
        function getSelectValue()
        {
            var selectedValue = document.getElementById("list").value;
            alert(selectedValue);
        }
        getSelectValue();
    </script>
 </body>
Posted by: Guest on June-12-2020
0

jquery get dropdown list selected value

$('#dropDownId').val();
Posted by: Guest on May-14-2020

Code answers related to "how to get the value from a dropdown when selected in javascript jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language