Home > Article > Web Front-end > jQuery implements cross-domain_jquery
I have seen cross-domain implementation using jsonp before, but I have never used it. Something is coming right now. I have tried many methods online, but to no avail. Finally I figured out how to use it and recorded it.
Client:
Server side
Be sure to call the callback function in the client js, otherwise an error will occur.
Regarding js spanning, the above method requires the cooperation of the server and outputs the callback function.
If you need to visit other people’s websites to grab something, in addition to using iframe, if you need to use js, how to deal with it.
We know that there is no cross-domain problem when the server accesses remote links. Therefore, we can take a detour and use js to access our local program and access our target URL in the program. This is a new idea, you can try it if necessary.