I am pretty new in JavaScript and I have the following problem.
Into a page I have the following select
dropdown:
<select id="selTipoRap" class="form-control" th:field="*{tipoRappresentante}" required="required" style="width: 55%;" onChange="nascondiBoxDocumentazione(this);">
......................................................................
......................................................................
OPTIONS LIST
......................................................................
......................................................................
</select>
Then I have this JavaScript function that is performed when the user selects an option into the previous select:
function nascondiBoxDocumentazione(ruoloSelezionato) {
alert("NASCONDI");
}
How can I obtain the value of the selected option into this JavaScript function?