这是什么错??
if(check) {
var monery = document.getElementById('monery').value; //充值金额
var account = document.getElementById('account').value; //账号
var name = document.getElementById('name').value; //账号
mui.ajax('http://192.168......./myproject/php/index.php', {
data: {
monery:monery,
account:account,
name:name
},
dataType: 'json', //服务器返回json格式数据
type: 'post', //HTTP请求类型
headers: {
'Content-Type': 'application/json'
},
success: function(data) {
console.log(1);
},
error: function(xhr, type, errorThrown) {
console.log(errorThrown);
}
});
alert('可以发送数据');
}
1***@163.com
- 发布:2018-08-16 11:10
- 更新:2018-08-16 11:11
- 阅读:2924
SyntaxError: Unexpected token < in JSON at position 0
分类:MUI
1 个回复
1***@163.com (作者) - 91小白
是 json 有错吗??