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"); });
posted on 2014-03-20 00:40 smelikecat 阅读(2057) 评论(0) 收藏 举报
浙公网安备 33010602011771号