怎样使用ajax调用restful webservice

2024-11-22 11:21:51
推荐回答(1个)
回答1:

先把webservice 添加到你的工程里面,然后

$.ajax({ type: "POST",
url: "WebService.asmx/ConvertYHOO",
data: "",
contentType: "application/json; charset=utf-8",
dataType: "json",
beforeSend: function () {
},
success: function (data) {
},
error: function (jqXHR, exception) {
}
});