📅  最后修改于: 2022-03-11 15:02:00.346000             🧑  作者: Mango
Use a string to store your option, and then append it to the select tag. Then, please check that data is there in the val.
$.getJSON("get-data.php?dat=driver",function(data){
var stringToAppend = "";
$.each(data,function(key,val) {
stringToAppend += "";
});
$("#night_Shift_text").html(stringToAppend);
});