jQuery的Ajax时无响应数据的解决方法_jquery

WBOY
Release: 2016-05-16 18:26:32
Original
1570 people have browsed it
复制代码代码如下:

$.ajax(
{
type: "POST",
url: "/MemberComment.aspx/GetOrderToBeCommentCount",
success: function(result) {
//ToDo:
}
)

使用时JS也没有报错。这个是我最郁闷的事了。不知道哪错。。
5分钟。。。10分钟。。。。20分钟。。。。。
从c#代码到浏览器一个个排查问题发现都OK。
最后问题的原因是改为如下就OK,少了2个属性:
复制代码代码如下:

$.ajax(
{
type: "POST",
contentType: "application/json",
url: "/MemberComment.aspx/GetOrderToBeCommentCount",
data:"{a:'a'}",
success: function(result) {
//ToDo:
}
)
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!