这是对 REST 服务的跨域请求:
$.ajax({
type: "GET",
dataType: "jsonp",
contentType: "application/javascript",
data: d,
//crossDomain: true,
async: false,
url:"http://xx.xx.xx.xx/MyService/MyService.svc/GetData",
success: function (jsonData) {
console.log(jsonData);
alert('Hello');
},
complete: function (request, textStatus) {
console.log(request.responseText);
console.log(textStatus);
},
error: function (request, textStatus, errorThrown) {
console.log(request.responseText);
console.log(textStatus);
console.log(errorThrown);
}
});
在这里,data: d
我可以发送多少数据?有限制吗?