我写了一段ajax 前提是后台接口没有错误可以访问
//ajax 关于下载内容
$(".download").click(function(){
$.ajax({
type: "GET",
url: "http://test.v2.hzpnc.com/business/newest-apk-version-for-personal",
dataType: "jsonp",
success: function(response,status,xhr){
console.log("cy");
console.log(response)
},
error:function(response){
console.log(response)
}
})
})
可能因为url是跨域的
url里面的内容是:
{"id":47,"file":"Project611_4.5.3_I_Release_201601251347-pinocchio.apk","appver":"4.5.3_Release","contents":"1.取消了快捷方式的默认安装改为提示用户安装\n2.修复部分BUG,增加稳定性","integral":10,"created_at":"2016-01-25 14:41:15","charger":"名字","state":1}
但是我那样请求 就报错了 里面的respone也打印不出来
报错:
Uncaught SyntaxError: Unexpected token :
请问大神们是怎么回事
Licco
相关分类