This article mainly introduces the differences between Jsonp keywords and json and jsonp. For details about the differences between ajax and jsonp, refer
Preface
The first time I heard about jsonp, it was actually two years ago. At that time, the lottery module on the activity page had to get a probability from the server. At that time, I didn't understand anything. My colleague said That ajax was used, and my colleague said that dataType was changed to jsonp, I changed it to jsonp. Since the activity page has been completed and jsonp has not been met in the future, during this period, I always thought that jsonp is closely related to ajax and is a special cross-origin form of xhr... it was not until I ran an interview a month ago and asked jsonp if I was abused as a dog that I decided to check jsonp.
Why use jsonp?
I believe that you are familiar with the same origin policy. What have you heard? It doesn't matter. Since it's a simple introduction, let's start from scratch.
If I have written an index page with a request, the request is a json data (I do not know the overview of the json Data's stamp JSON and its usage). I will write down the following code in a simple way: