Skip to main content

Posts

Showing posts with the label select

Get Dropdown Menu Value on JQuery

Here is the small JQuery code for getting the value of the dropdown box which is selected. HTML <select name="dropDownMenu"> <option>Option1</option> <option>Option1</option> <option>Option1</option> </select> JS $(document).ready(function(){ $("select").change(function(){ var str=""; str=$("select option:selected").text(); alert(str); }); });