jquery waits for Ajax to execute and then continues the effect of the following code, which, in fact, sets the async parameter of the jquery Ajax function to False, which defaults to 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 means that the window.open (' http://www.phpernote.com ') statement
success:function (msg) {
$ (' #) is executed only after waiting for the Ajax execution to complete Articlelist '). HTML (msg);
}
});
Here's a description of the jquery load wait effect
var dates = This.options.form.getWidgetByName ("dates"). GetValue (); $.ajax ({url: "http://127.0.0.1:9009/Brilliantzz/service/snproduct.do", Data:dates, Beforesend:function () {V
Ar h = document.body.clientHeight; $ ("<div class=\" Datagrid-mask\ "></div>"). CSS ({display: "Block", Width: "100%", Height:h}). Appendto ("
Body "); $ ("<div class=\" datagrid-mask-msg\ "></div>"). HTML ("Please wait while the production data is being uploaded ...").
"). 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 Date:" +data); Error:function (data) {alert ("Upload production data Exception!)
"); }
});