📌  相关文章
📜  使用数据库中的 jquery 填充下拉列表 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:00.346000             🧑  作者: Mango

代码示例1
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);
});