Jquery – Get Select List value on change
Posted by jovaniwayne on July 26, 2010
0 comments
Get the value(s) of the selected option on change event: For Single Selection: $(‘#checkstatus’).change(function(){ alert($(‘#checkstatus option:selected’).text()); }); For multiple Selection: var str = “”; $(‘#checkstatus’).click(function(){ $(‘#checkstatus :selected’).each(function(i, selected){ str += $(selected).text(); }); $(“#div”).text(str); }); to test the selected values, I placed a div with an id=”div”. For the real application of these, you may use [...]



