What is a domain?
Cross-domain means accessing data in one domain in another domain. If you just load the content of another domain without accessing the data, cross-domain is very simple, such as using iframe. But if you need to load and use this data from another domain, it will be more troublesome. For security reasons, browsers have strict restrictions on this situation, and some settings need to be made on both the client and server to implement cross-domain requests.
Introduction to JSONP
JSONP (JSON with Padding) is a commonly used cross-domain method, but it only supports JS scripts and JSON format data. As the name suggests,
JSONP is a technical means that uses JSON as a shim to implement cross-domain requests. The basic principle is to take advantage of the fact that HTML's