读书人

施用$.get()方法调用webservice

发布时间: 2012-12-30 10:43:15 作者: rapoo

使用$.get()方法调用webservice


$("#testWS").bind("click", function () {
$.get('WS1.asmx/text', { text: $("#txt").val() }, function (data) {
alert(1);
$("#result").html($(data));
});
});



[WebMethod]
[System.Web.Script.Services.ScriptMethod(UseHttpGet = true)]
public string text(string text)
{
return text;
}


点击按钮后没反应,菜鸟求助!
[解决办法]
你要config中配置的,配置 可以get和post
[解决办法]
要在配置文件中配置,支持post和GET

读书人网 >Web Service

热点推荐