错误描述:
js 提交 jquery ajax 请求,报错Unrecognized token ‘ename’: was expecting (‘true’, ‘false’ or ‘null’)
错误原因:
返回数据格式不规范
解决方式:
当dataType指定为json后,前台时使用JS拼装成的String类型的json数据,要注意格式,一定要使用JSON.stringify()方法才行
错误描述:
js 提交 jquery ajax 请求,报错Unrecognized token ‘ename’: was expecting (‘true’, ‘false’ or ‘null’)
错误原因:
返回数据格式不规范
解决方式:
当dataType指定为json后,前台时使用JS拼装成的String类型的json数据,要注意格式,一定要使用JSON.stringify()方法才行