jquery.ajax() call wcf,success,how to use wcf return value?
时间:2010-11-25 来源:庹庹
$txtZip.bind(
'change',function(){$.ajax({type:
"POST",url: http://www.tree.com/fossa/svc/Geo.svc/GetPostalCodeInfoJson,
data:
'{"postalCode":"' + $txtZip.val() + '"}',contentType:
"application/json; charset=utf-8",dataType:
"json",success:
function(ret) {alert(ret[0].Place);
},
error:
function (xhr){alert("error");}});
});
the return value ,success:function(ret),'ret' is the wcf method return value
相关阅读 更多 +