how to get selected text of dropdown in javascript

Set a default parameter value for a JavaScript function, Get selected value in dropdown list using JavaScript. As there could be multiple drop down lists in the same form, first we need to select the drop down list uniquely and get the value using the val function of jQuery By JavaScript … What does “use strict” do in JavaScript, and what is the reasoning behind it? var strUser = e.options[e.selectedIndex].value; This is correct and should give us the value. innerHTML is a convenience method invented by Microsoft.