10
09/2014
jquery select get selected index
jquery select get selected index
<select> <option>111</option> <option>2222</option> <option>3333</option> <option>444</option> <option>5555</option> </select> <script type="text/javascript"> $(function(){ $('select').change(function(){ console.log($(this).prop('selectedIndex')) console.log($(this)[0].selectedIndex) }) }) </script>
jquery select get selected option text
$("#myselect option:selected" ).text();
$("#list option[value='2']").text()