<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="AjaxByJquery.WebForm1" %> < html xmlns="http://www.w3.org/1999/xhtml"> < script src="jquery-1.8.3.min.js" type="text/javascript"> <br> / / When asyn is set to false, the ajax request is synchronous. That is to say, after the ajax block sends the request at this time, it will wait at function1() and will not execute function2() until function1 () part is executed. <br> // When asyn is set to true, the ajax request is asynchronous. When the ajax block sends a request, it will stay in function1() and wait for the return from the server, but at the same time (during this waiting process) , the front desk will execute function2(),<br> $(document).ready(function () {<br> $.ajax({<br> type: "POST",<br> url: "value.aspx? act=init",<br> dataType: "html",<br> async:true, <br> success: function (result) { function1() <br> <br> }<br> });<br> function2();<br> }</p> <p> );<br> function function1() {<br> alert('function1');<br> }<br> function function2() {<br> alert ('function2');<br> }</p> <p><br>