标签:
http://stackoverflow.com/questions/5061310/jquery-returning-parsererror-for-ajax-request
方法一:
直接去掉 dataType : ‘json‘ 属性
方法二:
The reason why this parserror message occurs is that when you simply return a string or another value, it is not really Json, so the parser fails when parsing it.
意思是说,如果你返回的不是真正的json格式的数据,那么就会提示parsererror。
因此,解决办法就很简单了,把返回的结果转换成Json格式就好了。比如php就可以使用 json_encode()函数
标签:
原文地址:http://www.cnblogs.com/bushe/p/4625070.html