jquery ajax代码
F[A]
当我在chrome中执行代码时,我收到此错误
$.ajax( {
cache: false,
crossDomain: true,
headers: {
"contentType": "application/json; charset=utf-8",
},
dataType: 'jsonp',
url: "https://ss.com/rest/v1/users/demo";
type: "GET",
beforeSend: function(xhr) {
xhr.setRequestHeader("Authorization", "Basic " + btoa("demo" + ":" + "password"));
},
success: function(data) {
console.log(data);
console.log("done");
},
error: function() {
console.log( "not done" );
}
} );
任何人都可以帮助我摆脱这个错误