本文介绍了在Jquery的帮助下从wcf服务获取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 大家好, 我最近两天享受jquery但是我的朋友在jquery的帮助下请求我帮助从wcf服务中获取价值。我尝试这种类型,但直到日期才能找到价值。 Hello everyone,I enjoying jquery last two days but my friend ask me help for get a value from wcf services with the help of jquery. I trying on this type but value can't be find till date. $(document).ready(function () { $.ajax({ type: "GET", url: "http://www.customer-supports.com/WcfService2/Service1.svc/Getjson", dataType: "json", success: function (xml) { alert('have a nice day'); //$(xml).find('Product').each(function () { // var id = $(this).find('COUNTRY_CODE').text(); // var name = $(this).find('COUNTRY_NAME').text(); // var price = $(this).find('IP').text(); // $('<tr><td>' + id + '</td><td>' + // name + '</td><td>' + price + '</td><td>').appendTo('#products'); //}); }, error: function (xhr) { alert(xhr); } }); }); 。主要是我想要国家代码的数据。尝试此链接并获取数据值并显示警报。 http://www.customer-supports.com/WcfService2/Service1.svc/Getjson [ ^ ] 推荐答案 这篇关于在Jquery的帮助下从wcf服务获取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
11-02 02:33