This article mainly introduces the information about Jqueryajax loading, waiting for execution to end, and then continuing to execute the following code operations. If you need it, you can refer to the effect of Jquery waiting for ajax execution to continue to execute the following code, the specific code is as follows. You can set the async parameter of the jquery ajax function to false. The default value of this parameter is true:
$ (Document ). ready (function () {loadphpernote (); window. open ('HTTP: // www.phpernote.com ');}); function loadphpernote () {var url = 'HTTP: // www.phpernote.com/ajax.php'; var data = 'Action = list'; jQuery. ajax ({type: 'post', url: url, data: para, async: false, // false indicates that window is executed only after ajax is executed. open ('HTTP: // www.phpernote.com ') Statement success: function (msg) {condition ('{articlelist'{.html (msg );}});}
The following describes the effect of jquery loading wait.
Var dates = this. options. form. getWidgetByName ("dates "). getValue (); $. ajax ({url: "http: // 127.0.0.1: 9009/Brilliantzz/service/snproduct. do ", data: dates, beforeSend: function () {var h = document. body. clientHeight; $ (""Mirror.css ({display:" block ", width:" 100% ", height: h}). appendTo (" body "); $ (""Pai.html (" uploading production data. Please wait... "). AppendTo ("body" ).css ({display: "block", left :( $ (document. body ). outerWidth (true)-190)/2, top :( h-45)/2});}, complete: function (data) {$ ('. datagrid-mask-msg '). remove (); $ ('. datagrid-mask '). remove () ;}, success: function (data) {alert ("production data:" + data) ;}, error: function (data) {alert ("An error occurred while uploading production data! ");}});