$.ajax({
type: "get",
async: false,
url: "",
data: {
app: "Cas",
class: "Login_Login",
phone: "11111111",
password: "123456"
},
dataType: "jsonp",
success: function(json) {
//在此之前若没有定义回调函数success_jsonpCallback1则执行下面的代码
console.log(json)
},
error: function() {
alert('fail');
}
});
//返回数据是这样的
{
"status": "0",
"msg": "",
"data": {
"userid": null,
"phone": null,
"username": null,
"nickname": null,
"avatar": null,
"birthday": null,
"gender": null
}
}
//FireFox报错 SyntaxError: missing ; before statement //Chrome报错 Uncaught SyntaxError: Unexpected token :
不再使用
相望江湖
泽林
相关分类