我必须为移动网络应用程序发出 ajax 请求,我使用了以下代码
$.ajax({
type: type, //GET or POST or PUT or DELETE verb
url: requestURL, // Location of the service
// contentType: "application/x-www-form-urlencoded", // content type sent to server
dataType: "xml", //Expected data format from server
processData: false, //True or False
success: successCallback, //On Successfull service call
error: serviceFailed// When Service call fails
});
但它失败并出现错误“错误:访问被拒绝。我正在从 javascript 调用 .aspx 服务