Home  >  Article  >  Web Front-end  >  jQuery的Ajax时无响应数据的解决方法_jquery

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

WBOY
WBOYOriginal
2016-05-16 18:26:321605browse
复制代码 代码如下:

$.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:
}
)
Statement:
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