I have a drop down list that fetches values from db as follows
$.get(\'/getJobs\', function (jobs) { seljobs = jobs; var i = 0; jobs.forE
If you are trying to get the id, then please update your code like
html += '' + n.names + '';
To retrieve id,
$('option:selected').attr("id")
To retrieve Value
$('option:selected').val()
in Javascript
var e = document.getElementById("jobSel"); var job = e.options[e.selectedIndex].value;