Home >Web Front-end >JS Tutorial >Jsonp cross-domain principle and Jquery solution_jquery
If we want to make a cross-domain request, we can make a cross-domain request by using the script tag of html and return the script code to be executed in the response, where the javascript object can be passed directly using JSON. This cross-domain communication method is called JSONP.
Personal understanding:
It is to dynamically register a function a(data) on the client, and then pass the function name to the server, and the server returns a({/*json*/}) to the client for running, like this Just call the client's function a(data), thereby achieving cross-domain.