1 $.post('/ajax/validate.do',{"id": id},function(ret){
2     //ret
3 });

返回值明明是json,格式也是正确的,却解析不成功,在Google Chrome下报错——Uncaught SyntaxError: Unexpected token :  

http://stackoverflow.com/questions/3143698/uncaught-syntaxerror-unexpected-token

解决方法:
    
$(function(){
    $.post("/ajax/json.do",{'id':id},function(ret){
        //ret;
    }, "json");
});

 

相关文章:

  • 2021-09-25
  • 2022-12-23
  • 2021-10-18
  • 2021-09-02
  • 2021-04-19
  • 2021-03-30
  • 2021-06-21
猜你喜欢
  • 2022-12-23
  • 2021-09-30
  • 2022-12-23
  • 2021-11-11
  • 2022-12-23
  • 2021-06-18
  • 2021-10-31
相关资源
相似解决方案