[WebMethod]
public string HelloWorld()
{
return "Hello World";
}var webMethod = "http://localhost:54473/Service1.asmx/HelloWorld"; $.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
data: "{}",
dataType: "json",
url: webMethod,
success: function(msg){ alert(msg.d); },
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert(errorThrown);
}});慕娘9325324
相关分类