- 时间:2020-12-21 21:29 编辑: 来源: 阅读:
- 扫一扫,手机访问
摘要:JQuyer $.post 与 $.ajax 访问WCF ajax service 时的问题需要注意的地方
[url=http://www.1sucai.cn/upload/201109/20110920221910527.png][img]http://files.jb51.net/upload/201109/20110920221910818.png[/img]
[/url]
$.ajax:
[url=http://www.1sucai.cn/upload/201109/20110920221910986.png][img]http://files.jb51.net/upload/201109/20110920221910383.png[/img]
[/url]
感觉$.post是用来提交forms的,而要跟wcf ajax service访问,还必须得用$.ajax来指定Content-Type.
后来找到的资料: [url=http://stackoverflow.com/questions/2845459/jquery-how-to-make-post-use-contenttype-application-json]http://stackoverflow.com/questions/2845459/jquery-how-to-make-post-use-contenttype-application-json[/url]
以上都是按个人理解所写,有不对之处请指正