利用jQ POST请求不行吗?
$.ajax({
type: "POST",
contentType: "application/json",
url: "AjaxPage.aspx/GetAllLocation",//不管你切换到哪个页面只要能访问调用的页面就行。
data: "{}",
dataType: "json",
success: function (msg) {
//返回的数据进行处理。
var datas = eval('(' + msg.d + ')');
});
}
}
});
[WebMethod]
public static string GetAllLocation()
{
return "";返回结果
}
$.ajax({
type: "POST",
contentType: "application/json",
url: "AjaxPage.aspx/GetAllLocation",//不管你切换到哪个页面只要能访问调用的页面就行。
data: "{}",
dataType: "json",
success: function (msg) {
//返回的数据进行处理。
var datas = eval('(' + msg.d + ')');
});
}
}
});
[WebMethod]
public static string GetAllLocation()
{
return "";返回结果
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货