With jQuery, you can use text() or html() method to get the selected text from a drop-down. When an item is selected in the HTML Select DropDownList, the jQuery OnChange event handler is executed within which the Text and Value of the selected item is fetched and displayed in JavaScript alert message box. You can add your comment about this article using the form below. If you wanted to get the string "Mr" if the first option was selected (instead of just "1") you would do that in the following way: Based on your requirement, single or both values can get from the select element. In some cases we need to set dropdown list items exact text by matching the value entered in textbox. To get selected text value from dropdown or asp.net dropdownlist using jQuery, we need to bind the change event on document.ready function of jQuery. How to set selected a value in ASP.NET MVC dropdown list . Dynamically set properties of textbox based on the value selected from dropdown. When the Other (option) in DropDownList is selected, the TextBox will be enabled else disabled. We can select text or we can also find the position of a text in a drop down list using option:selected attribute or by using val() method in jQuery.. By using val() method : The val() method is an inbuilt method in jQuery which is used to return or set the value of attributes for the selected elements.. Syntax : $(selector).val(parameter) Today, with jQuery, I do this: $("#foo").change(function(){ var foo = $("#foo option:selected").text(); }); \#foo is the drop-down box id. First there's the value to be sent to the server, which is easy: The second is the text value of the select. However, you also have to use the find() of jQuery to find the currently selected option. You can try to run the following code to learn how to change the selected value of a drop-down list. The $(this) selector selects the currently selected value of the drop-down. Ask Question Asked 10 years, 3 months ago. This can be done in several ways using the :selected property to get the chosen option of the select … jQuery :selected Selector jQuery Selectors. The above example contains the select dropdown option and jQuery change event. Here in this example, we are going to select option contains a particular text by clicking a button. The HTML Button has been assigned a jQuery OnClick event handler. * All browser logos displayed above are property of their respective owners. ... how to set the value in textbox on the Selected value of DropDown using Jquery. The :selected selector selects option elements that are pre-selected. I am unable to select dropdown value when i created it dynamically. The options property returns the collection of all the option elements in the