复制代码 代码如下:
string callback = Request["callback"];
string response = string.Format("/"value1/":/"{0}/",/"value2/":/"{1}/", v1, v2);
string call = callback + "({" + response + "})";
Response.Write(call);
复制代码 代码如下:
var url = "xxx.aspx?p1=1&p2=2&callback=?";
jQuery.getJSON(url, function(data) {
alert("value1:" + data.value1+ " value2:" + data.value2);
});
复制代码 代码如下:
jQuery.ajax({
type:"get",
url: "xxx.aspx",
dataType : "jsonp",
jsonp: "callback",
data: "p1=1&p2=2&callback=?",
success:function(msg){
alert("value1:" + data.value1+ " value2:" + data.value2);
}
});
新闻热点
疑难解答
图片精选