在前端经过ajax请求后台以后返回的时候,出现了下面的异常:前端
error: function(req, textStatus, errorThrown){}ajax
req:json
textStatus:"parsererror";app
errorThrown:undefined.async
而本身的ajax请求以下:url
type: 'POST',
contentType: 'application/json',
data: JSON.stringify(dataModel.dataSource()),
url: url1,
async: false,
dataType: 'json',对象
解决方案:将dataType注释掉就可了,缘由是个人返回值是一个字符串而不是一个对象~~字符串