How to get index of selected option in Select control




It took me some time to get the index of selected value of <select> html control. I tried to use 'attr', but 'prop' should be used for this.

 




MarkiMarta.com. Notes of web-specialist
Since 2009
18+