HTML select on-change event JavaScript

This is an example how to get the index and selected text from a select in html:

Try it:

Code: