// 【type: "Post",】 $.ajax({ //要用post方式type: "Post", //方法所在页面和方法名url: "Demo.aspx/SayHello", contentType: "application/json; charset=utf-8", dataType: "json", success: function(data) { //返回的数据用data.d获取内容alert(data.d); }, error: function(err) { alert(err); } });