我已经重新运行以下代码来调用API,它可以在Chrome和Firefox中使用。
但在IE中,每次都没有击中api控制器。
var jsonURL = crmWebUrl + "Shipment/ShipmentListCallBack?customerName=" + customerAccount;
$.ajax({
type: 'GET',
async: true,
dataType: "json",
url: jsonURL,
success: function(data) {
if (data != undefined && data.length > 0) {
// call the method for Bind the data to grid
BindShipmentTable(data);
$('#btn-export').show();
$('#dvLoading').hide();
} else {
data = [];
$('#dvLoading').hide();
BindShipmentTable(data);
$('#btn-export').hide();
ShipmentPopUp("Shipment list not found for the customer.");
}
},
error: function(response) {
$('#dvLoading').hide();
$('#btn-export').hide();
ShipmentPopUp("Shipment list not found for the customer.");
}
});