javascript - A strange error occurred when using ajax to handle get cross-domain. .
phpcn_u15822017-05-19 10:10:09
0
3
674
Only $.ajax is shown here. In fact, I have also used $.get and $.getJSON to get the data, but a common error was reported! ! ! The data can be obtained!!
The format of
json is:
{"a":"123"}
jsonp的格式是:
callback({"a":"123"});
所以,会报那个意外的字符
:
.The requested address is not the returned jsonp data.
First you have to determine whether the parameter passed in is an object or a json string, and then see if your analysis is correct