combined with Ajax to implement the synchronous execution problem of data asynchronous requests


Before the file uploads, I need to determine whether the size of the upload file you choose is in line with the range I set. Here I used the $ .json () in jQuery at first; it was carried out, and finally found that the data had not returned to the client before the judgment was returned. The problem lies in the size of this file.

The root cause of the

question is that if there is no synchronous execution in jquery, the background is changed to $ .ajax () in jQuery; method, this method can be set in the method of synchronization. As shown in the following code:

Hope to help friends in need.


Random Posts


05. JSP exception processing AL

[Dry goods] Python uses Matplotlib to achieve data visualization

Reptur Learning Personal Summary (1)

ubuntu16.04 Install Hadoop3.2.1