javascript - How to return data obtained asynchronously
我想大声告诉你2017-05-16 13:12:20
0
3
455
As shown in the figure, the data is obtained asynchronously using ajax. How to return the data to the previous layer. . . As shown in the figure, how can we make the second return value asynchronously obtain the returned data
The person above is right, use promise
Use
Either change it to synchronous or use callback, your return is useless
Make it a Promise