Is this possible using some combination of javascript and html?
<select onchange="myFunction(valueOfThisSelector)">
<option value="op1">Op1</option>
<option value="op2">Op2</option>
<option value="op3">Op3</option>
</select>
I would prefer if the solution is achieved without using element ids, because I want to be able to apply this to many selectors. If the value reference can be achieved in the myFunction()
script that is also an option, so long as it doesn't use document.getElementById()
.