📜  jquery 没有从 ajax 中调用的 div 调用 id - Javascript 代码示例

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

代码示例1
$(document).on('change', '#typeship', function(e){
  var courier = $('#courier').val();
  var cityfrom = $('#cityfrom').val();
  var cityto = $('#cityto').val();
  var weight = $('#tot_weight').val();
  var shiptype = $(this).val();
  alert (shiptype); // didn't response -> no alert pop up 
  $.ajax({
    type: "POST",
    url: "backend/Ctransaction/showShipCost",
    data: {Courier:courier, Cityfrom:cityfrom, Cityto:cityto, Weight:weight, Shiptype:shiptype},
    datatype:"html",
    success: function(data){
      $('#detailcost').html(data);
    }
  });
});