Home >Web Front-end >JS Tutorial >What is the principle of JSONP?
JSONP principle: first register a function on the client; then pass the name of the function to the server; then the server converts the JSON data into JSON data and passes the data into the function registered on the client using Javascript syntax; Finally, just receive JSON in the client registration function.
JSONP
JSONP (JSON with Padding) is a "usage mode" of JSON that can be used to solve Issues with cross-domain data access by mainstream browsers. Due to the same-origin policy, generally speaking, web pages located at server1.example.com cannot communicate with servers other than server1.example.com, with the exception of the HTML