$.ajax({
type :"POST",
async:false,
data : dataInfo,
timeout:300000,
contentType: "application/x-www-form-urlencoded",
url : abc,
dataType:"json",
success : function(response) {
result=response;
},
error : function(XMLHttpRequest, textStatus, errorThrown, data) {
alert("數據有誤,請審覈!");
}
});
利用POST方式,對應的contentType應該爲application/x-www-form-urlencoded
利用GET方式,對應的contentType應該爲application/json或者text