jquery来处理ajax,用到了json。但是很诧异,jquery的ajax回调时一直调用了error函数(一直提示parsererror异常),success函数一次没执行过

1 $.ajax({
2 type:'POST',
3 url:'/go.php?p=chat.chatCenter&a=send',
4 dataType:'json',
5 data:'style='+Tstyle+'&content='+content,
6 success:function(data){$.chatCenter.sendEnd(data);},
7 error:function(data,t){alert("系统异常["+t+"]");$.chatCenter.sendEnd();}
8 });

最后发现是json的数据格式出错了!数据格式必须为双引号

相关文章:

  • 2022-01-30
  • 2022-12-23
  • 2021-11-04
  • 2021-05-28
  • 2022-02-07
  • 2021-11-28
  • 2022-02-19
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案