To learn more, see our tips on writing great answers. (And for the text, I just wanted to show this way). Once the onChange is invoked you can add either JS or JQuery Code Snippet to get your thought working. i thought the ".value" in javascript should returns the value for me but only the ".text" would returns as what the .SelectedValue in asp.net returns. (and you can update it again as you wish), Use following code,I have tested it and its working. DOM find current selected drop down element, Call function based on dropdown selection, How to get the value of a selected text in javascript, Get value selected in dropdown list using Javascript (displays null). Why did the Soviets not shoot down US spy satellites during the Cold War? Which "href" value should I use for JavaScript links, "#" or "javascript:void(0)"? Most answers here get the value of the "this" select menu onchange by a plain text JavaScript selector. Using element.value property. Get select dropdown list value on change using JavaScript Select a value from the dropdown list, which will trigger the onchange event inside your JavaScript code. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide, .value() works on modern browsers but not on really old ones. The difference is While working on some form-related user interface, we often use the select option, and to use that, we will surely need those values that are being selected. select is an HTML input element that specifies the dropdown list of options from which the user can choose any option. Basically I want to show the same combobox at different place,so i gave 2 different ids to 2 combobox.Is there anyway, that i can show the same combobox at different place. I will you use the onclick and onchange to get value selected option.you can easy to get selected option value bellow follow example. The above code has been tested in the following browsers. How to get the children of the $(this) selector? How did Dominion legally obtain text messages from Fox News hosts? This is the simplest solution, at least for modern browsers. Does Cosmic Background radiation transmit heat? Displaying value selected by the user from a dropdown 1. What are some tools or methods I can purchase to trace a water leak? She has been producing technical writing for at least a year and a half. onchange="myFunction()">, W3Schools is optimized for learning and training. How can I select an element by name with jQuery? Note: This adds this 'previous' functionality to all selects, so be sure to fine-tune the selectors if needed. Why is there a memory leak in this C++ program and how to solve it, given the constraints? I checked how EasyUI fetches that #mm name, and I could not find out how to get that name without the help of EasyUI. Can the Spiritual Weapon spell be used as cover? August 20, 2014 at 10:07 am. But that's byond scope of this Q and if you are interested then I can post it also. Examples HTML @Sinaesthetic, I had the same issue (and already upvoted this answer). in select dropdown on change this.value = id. You can store this in a variable outside the anonymous function to ensure you can get the correct scope you need, this way of getting the value won't work in old browsers, use Danny's solution instead, I don't mean to be offensive, but are you sure it's a good idea to still suggest using id while a handler can use. jQuery is valid JavaScript code, but not all JavaScript is jQuery. Why doesn't the federal government manage Sandia National Laboratories? So what *is* the Latin word for chocolate? As a senior MEAN/MERN stack developer and project manager with more than 4 years of experience in this sector, she now handles multiple projects. I want to show one combobox-A, which is an HTML