我想发出 Ajax 请求...但是我的服务器没有响应。什么问题?
$.ajax({
type: 'GET',
url: 'https://my_server.php',
async: true, beforeSend: function (xhr) {
if (xhr && xhr.overrideMimeType) {
xhr.overrideMimeType('application/json');
}
},
success: function (response) {
alert(response);
},
error: function(request,status,errorThrown) {
alert("Network error")
}
});