jquery使用ajax报错[Uncaught SyntaxError: Unexpected token :]
$.post('/ajax/validate.do',{"id": id},function(ret){
//ret
});
返回值明明是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");
});
jquery使用ajax报错[Uncaught SyntaxError: Unexpected token :]的更多相关文章
- vue - public 引入 <script>报错 Uncaught SyntaxError: Unexpected token '<'
1.现象 原本我是直接在母版引入 <script type="application/javascript" src="static/config.js" ...
- 打开了chrome审查元素 发现报错 Uncaught SyntaxError: Unexpected token )
这个错误并不影响业务处理,但是看到有报错,心里总是不爽. 经过几番查找,发现了原因. <a href="javascript:void()" oncick="onS ...
- vue项目npm run dev 报错Uncaught SyntaxError: Unexpected token <
目前代码所处位置是micro分支,该分支是从dev分支直接拉下来进行npm run dev的,而dev分支是可以正常运行的,网上的诸多解释是babel转义时候报错,其实对比可见,两个分支不同的地方应该 ...
- 后台返回json字符串 页面js报错 Uncaught SyntaxError: Unexpected identifier
后台json字符串是 [{"name": "报销申请", "id": "start"}, {"name&quo ...
- HTML5 plus 报错 Uncaught SyntaxError: Unexpected identifier at XXXX.html:1
最近使用 VUE2.X + muse-ui + HTML5 plus 开发webApp 调用HTML5 plus报错,错误提示如下 Uncaught SyntaxError: Unexpected ...
- chrome js报错Uncaught SyntaxError: Unexpected string
个人博客 地址:http://www.wenhaofan.com/article/20180912123136 js报错,最后发现是$(function(){})这部分()不完整 $(function ...
- chrome查看js报错Uncaught SyntaxError: Unexpected string
个人博客原文http://wenhaofan.com/article/20180912123136 js报错,最后发现是$(function(){})这部分()不完整 $(function({ $(& ...
- 页面报错Uncaught SyntaxError: Unexpected identifier
错误描述:未捕获的语法错误:意想不到的标识符. 如图所示:检查之后发现是页面js内缺少“,”引起的.添加之后就OK了.
- Thinkphp中js报错,Uncaught SyntaxError: Unexpected token }
tp中js在行末使用注释报错Uncaught SyntaxError: Unexpected token } if (new_directors==1) {// 注释 解决办法:注释换成单行 if ( ...
随机推荐
- html资源 链接
http://m.aicai.com/index.do?agentId=1&vt=5
- [Fiddler] The connection to 'xxxxx.com' failed. <br />System.Security.SecurityException Failed to negotiate HTTPS connection with server.fiddler.network.https> HTTPS handshake to intelte
最近利用模拟发get请求的时候出现: [Fiddler] The connection to ‘xxxxx.com' failed. <br />System.Security.Secur ...
- C语言实现24点程序
一.简介 本程序的思想和算法来自于C语言教材后的实训项目,程序通过用户输入四个整数计算出能够通过加减乘除得到数字24的所有表达式,程序的设计有别于一般通过穷举实现的方式,效率得到提高.算法介绍如下: ...
- Python3 open() 函数
Python3 open() 函数 Python3 内置函数 Python open() 方法用于打开一个文件,并返回文件对象,在对文件进行处理过程都需要使用到这个函数,如果该文件无法被打开,会抛出 ...
- MyBatis多对多查询
-------------------siwuxie095 MyBatis 多对多查询 以订单和商品为例,即 一个订单可 ...
- 使用UltraISO制作光盘镜像
为什么使用光盘镜像文件: 1. 有些光盘中的内容必须在光盘运行环境中运行: 有些光盘的内容要在光盘运行的时候才能运行,即使你安装到电脑上都不行!例如某些游戏光盘等,这样就得每次使用时都要用光盘,对光驱 ...
- C#中货币类型和数值类型、字符串类型的转化
1.定义textbox的数据 private void Form1_Load(object sender, EventArgs e) { this.textBox1.Text = String.For ...
- mongo远程登录
1. 进入数据库: use admin db.addUser("foo","foo"); ps:高版本用db.createUser创建. 2. 改配置 如/et ...
- [leetcode]299. Bulls and Cows公牛和母牛
You are playing the following Bulls and Cows game with your friend: You write down a number and ask ...
- 前后台交互(打开前端页面,不传递任何数据,发送ajax请求)
1.打开前端,不传递任何数据 <script src="./jquery.min.js"></script> <script> $(docume ...