1.jquery调用形式
$.getJSON("http://www.url.net/Interface/Res.aspx?callback=?",
{ style: "fb", strPageSizeFB: "10" },
function(data) {
$("#show").html(GenerateTable(data.Head));
});
一定加上callback=?
2.server返回形式
Response.Write(context.Request["callback"] + "({\"msg\":\"hello ajax!\"});");
3.server返回最好是“干净”的json内容,比如不要发送cookie之类的(可能web容器会自己发送)。asp.net最好使用ashx文件
ikmb@163.com