Get index of selected option with jQuery

The first methods seem to work in the browsers that I tested, but the option tags doesn’t really correspond to actual elements in all browsers, so the result may vary.

Just use the selectedIndex property of the DOM element:



Since version 1.6 jQuery has the prop method that can be used to read properties:


Leave a Comment