I would like to ask your seniors about the cross-domain data processing sent by the receiving server.

is that I want to look at the data received by cross-domain requests and process it according to the situation, but keep reporting an error of SyntaxError: expected expression, got"<". Does the data received by jsonp cross-domain requests have to be executed by js code in the function? Can"t it be other data

Nov.19,2021

because in principle, jsonp solves cross-domain problems through script tag, so no matter what data you want to transfer, jsonp needs to encapsulate the data in a legitimate js fragment, which is usually a function call, but what data the function call passes is exactly the data we want, which can be arbitrary, such as a json, or an array.


jsonp cross-domain needs back-end interface support jsonp needs back-end cooperation to deal with cross-domain problems

Menu