Cross-domain is often encountered in js, and this article will explain it in detail.
The same-origin policy is a good security mechanism, but sometimes we need to obtain data or interact with different domains. At this time, the same-origin policy will cause obstacles.
Cross-domain is to realize the transmission and interaction of data information from different sources.
There are several ways to achieve cross-domain:
1.JSONP
JSONP is the abbreviation of JSON with padding (parametric JSON) and is a new application method of JSON.
The implementation of JSONP relies on the use of dynamic