Skip to navigation
Create a select dropdown with jquery
08.06.21
function create_select(_id, reports){ /* takes an object like {"name":{"key":name}} */ let s = jQuery("#"+_id); let o = ""; for(let i in reports) { let sel = ''; if(reports[i]['selected'] == true) { sel = 'selected="selected"'; } o += "
"+ i +"
"; } s.html(o); }
Reply
Anonymous
Information Epoch 1732544771
Fold knowledge into data so program logic can be stupid and robust.
Home
Notebook
Contact us