I have the following html code that displays a list of elements.
<div class="form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12">Product</label>
<div class="col-md-9 col-sm-9 col-xs-12">
@Html.DropDownListFor(x => x.CustomerId, Model.ProductsList, new { @data_placeholder = "Select Product...", @data_parsley_required = "true" })
</div>
</div>
I need in javascript to obtain the selected element, to pass this parameter through an ajax call to a controller.
How is the id of the selected element obtained? Greetings