最近没写什么---更新下,在家没键盘就偷懒了

 

 代码:

主要用jQuery修改,还没实现写入,只是显示出来

 

 

<script>
    var carmassage=[]
    $.ajax({
        url: "/businfo",
        type:"GET",
        success: function(response){
            carmassage = response;
            console.log(carmassage)
            //查看到获取信息成功
            //把空闲的司机显示出来,可以安排

            for(var i=0;i<carmassage.length;i++) {
                var option = document.createElement("option");
                document.getElementById("cardriverselect").appendChild(option);
                option.value = i + 1; //每个option的位置
                option.text = carmassage[i].busdriver;//每个Option的值
            }
            return;
        }
    });
</script>

相关文章:

  • 2021-08-08
  • 2022-03-07
  • 2021-12-13
  • 2021-10-05
  • 2021-12-03
  • 2022-02-27
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-15
  • 2022-01-20
  • 2021-06-10
  • 2021-07-20
  • 2022-12-23
  • 2021-05-28
相关资源
相似解决方案