Combining the accepted answer above with the answer from this other question, you get: In your codethis refers to the select element not to the selected option, to refer the selected option you can do this -, The Code is very Simple, Lets Put This Code. Hence the option is added to the select element. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. Selectors > Form | Selectors > jQuery Extensions :submit Selector You must escape square brackets in a jquery selector for it to work correctly in IE7. As Matt above said, you should use select in your selector, not input, they are different elements. What do we mean when we say that black holes aren't made of anything? Sorry about that. The jQuery select option is used to display selected content in the option tag. input field array name select jquery. Stack Overflow for Teams is moving to its own domain! Get the value of the first option in a select list using jQuery, How to select first option in a select box after appending options by jquery, First select in dropdown jquery, Jquery block to first option . See: $(input).find(":selected") will get you the selected option, from there you can use val() and attr() to get the values. Asking for help, clarification, or responding to other answers. Does no correlation but dependence imply a symmetry in the joint variable space? Thanks for contributing an answer to Stack Overflow! rev2022.11.15.43034. I can only presume you're replying to a comment before your which was deleted? To learn more, see our tips on writing great answers. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Where should I put