什么是使用jQuery调用.NET Web服务的最佳方法是什么? [英] What is the best way to call a .net webservice using jquery?

查看:141
本文介绍了什么是使用jQuery调用.NET Web服务的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想只用jQuery来调用从另一个域中的.NET Web服务。

I'd like to call a .net webservice from another domain using only jquery.

什么是做到这一点的最好方法是什么?以及是否有我需要知道在网站上托管的网页的任何配置更改?

What is the best way to do this? and are there any configuration changes I need to be aware of on the web site hosting the web page?

我问这个的原因是,我只能勉强在该地区的控制权。 所以,我只能做有限的改动。

The reason I ask this, is that I am only marginally in control of that area. So I can only make limited changes.

推荐答案

我觉得你的问题是使跨域调用。你有你的jQuery请求的数据类型更改为 JSONP

I think your problem is to make the crossdomain call. You have to change the data type of your jQuery request to jsonp.

看看这的链接

这篇关于什么是使用jQuery调用.NET Web服务的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆