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.