get index of selected item javascript code example
Example: get index of selected option javascript
$("#sel").attr("selectedIndex")
// or
$("#sel")[0].selectedIndex
//or
$(this).prop('selectedIndex')
$("#sel").attr("selectedIndex")
// or
$("#sel")[0].selectedIndex
//or
$(this).prop('selectedIndex')