ajax请求dotnet webservice格式

$.ajax({
  type: "post",
  url: "your_webservice.asmx/you_method",
  contentType: "application/json; charset=utf-8",
  dataType: "json",
  data: '{parameter_key:"parameter_value"}',
  success: function (data) {
  alert(data.d);
  },
  error: function () {
  alert("fail");
  }
});

注:数据格式均采用json

posted @ 2016-08-24 18:22  nerocloud  阅读(148)  评论(0编辑  收藏  举报