jquery | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren


How to i get unselected options in dropdown , when user selected the option im gtng like $(ÔÇť#id option:selectedÔÇŁ).val() or .text but i want unselected values for checking dynmaic conditions.. if any one knw kindly share ur answers. Thank you

22nd Apr 2018, 9:34 AM
M┼Ĺh├ą┼ł ─Â┼▒m├Ž┼Ö
M┼Ĺh├ą┼ł ─Â┼▒m├Ž┼Ö - avatar
1 Antwort
+ 2
<select id="sel"> options </select> $("#sel option:not(:selected)") will return an array of objects containing the not selected ootions. can do $.each($("#sel option:not(:selected)"), function() { // do something with $(this).val() });
22nd Apr 2018, 9:45 AM
Adam - avatar