欧美日韩不卡一区二区三区,www.蜜臀.com,高清国产一区二区三区四区五区,欧美日韩三级视频,欧美性综合,精品国产91久久久久久,99a精品视频在线观看

jQuery Mobile

asp.net+jquery Jsonp使用方法介紹

時(shí)間:2024-10-08 19:04:58 jQuery Mobile 我要投稿
  • 相關(guān)推薦

asp.net+jquery Jsonp使用方法介紹

  服務(wù)器端

  復(fù)制代碼 代碼如下:

  string callback = Request["callback"];

  string response = string.Format(""value1":"{0}","value2":"{1}", v1, v2);

  string call = callback + "({" + response + "})";

  Response.Write(call);

  客戶端

  這里使用JQ,有下面兩種調(diào)用方法:

  1、使用getJson

  復(fù)制代碼 代碼如下:

  var url = "xxx.aspx?p1=1&p2=2&callback=?";

  jQuery.getJSON(url, function(data) {

  alert("value1:" + data.value1+ " value2:" + data.value2);

  });

  2、使用ajax

  復(fù)制代碼 代碼如下:

  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);

  }

  });

【asp.net+jquery Jsonp使用方法介紹】相關(guān)文章:

早教機(jī)使用方法10-24

柔膚水的作用和使用方法09-05

淡奶油的具體使用方法07-14

Word 2000“幫助”菜單使用方法03-19

excel中sumif函數(shù)使用方法03-23

Excel中COUNTIF函數(shù)的使用方法01-23

關(guān)于健身器材的使用方法04-28

各種健身器材使用方法09-19

用友財(cái)務(wù)軟件項(xiàng)目核算的使用方法08-22

英語六級(jí)作文五大標(biāo)點(diǎn)符號(hào)使用方法09-05