zoukankan      html  css  js  c++  java
  • jquery使用ajax报错[Uncaught SyntaxError: Unexpected token :]

    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");
    });
  • 相关阅读:
    hdu1066之数学题
    hdu1065计算几何
    hdu1060
    hdu1056
    appium安装说明
    LR安装说明
    网络编程
    读写excel
    dom
    HTML
  • 原文地址:https://www.cnblogs.com/shuman/p/3608066.html
Copyright © 2011-2022 走看看