Not the answer you're looking for? The following HTML Markup consists of an HTML DropDownList and a Button. To learn more, see our tips on writing great answers. By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. How can I select an element by name with jQuery? Does Cast a Spell make you a spellcaster? I'm trying to understand how to iterate through the options in the using jQuery? i added it using .addClass("bold"), I believe this is what you are looking for. Syntax: $ (selector).val (parameter) You can pass the desired option value to .val() method while targeting select to select required option element: Find all options with value equal to 2 and select them: You can explore the value key of this jquery object. Loop through all options in a drop-down list, and output the text of each option: var x = document.getElementById("mySelect"); var txt = ""; var i; for (i = 0; i < x.length; i++) { txt = txt + x.options[i].text + "<br>"; } The result of txt will be: Apple Orange Pineapple Banana Try it Yourself Example Use the :checked selector instead. my ajax code is, $("#City").html(data); this is used to list data in selectbox its working good result like. You can add the value as an argument within the quotes (' '). Why do we kill some animals but not others? as in example? In pure JavaScript, you can loop through each