How to solve the execution order of a piece of code outside the Jquery $.ajax function
This article focuses on "how to solve the execution order of a piece of code outside the Jquery $. Ajax function", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to solve the execution order of a piece of code outside the Jquery $. Ajax function.
Async:false
The var flag=true; / / async:false representative executes $.ajax ({url: "EmailCheck.ashx", async:false,data: {"email": $("# email"). Val ()}) .done (function (data) {if (data== "Fail") {flag=false;}}); if (flag) {$("# showInfo"). Text (""); return true;} else {alert ("this mailbox already exists!") $("# showInfo"). Text ("the mailbox already exists"); return false;} so far, I believe you have a better understanding of "how to solve the execution order of a piece of code outside the Jquery $.ajax function". You might as well do it in practice! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!