Home > other >  Ajax USES the json cross-domain problem Cross - Origin Read Blocking (CORB) blocked Cross - the Orig
Ajax USES the json cross-domain problem Cross - Origin Read Blocking (CORB) blocked Cross - the Orig

Time:03-29




$(function () {

$. Ajax ({
Type: "get",
Url: "http://web.juhe.cn:8080/environment/water/river? River=the Yellow River basin & amp; Key=c54b05e9318a3c33e4c618710978c41c ",
DataType: "json",
Success: the function (data) {
The console. The log (" data: "+ data).
$(" # info "). The HTML (data);
},
Error: function () {
$(" # info "). The HTML (" AJAX request failed ");
},
BeforeSend: function () {
$(" # info "). The HTML (" is in the request data... ");
$(" # info "). The CSS ({
"The font - size" : "12 px,"
"Color" : "red"
});
}
})

})
 Cross - Origin Read Blocking (CORB) blocked Cross - Origin response to print out the desired result

CodePudding user response:


The back-end agent

CodePudding user response:


Set the response of the head Access - Control - Allow - Origin see,

CodePudding user response:


See if the backend interface problems, using the json approach, is the need for the backend with

CodePudding user response:


Jquery cross domain https://my.oschina.net/glorylion/blog/478010


Give you looked I write blog before

CodePudding user response:


Excuse me, where you solved, I here
also encounter this problem?

CodePudding user response:

: can you tell me where you solved the
  • Related