Jquery waits for the ajax execution to complete and then continues to execute the following code. The specific code is as follows, which is to 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?#(('{articlelist'{.html (msg );}});}
Articles you may be interested in
- Windows cannot start the hardware device because its configuration information (in the Registry) is incomplete or damaged. (Code 19) Solution
- Jquery achieves the effect of table row-changing
- $. Post and $. ajax Usage Analysis in Jquery
- Js: Click enter and move the cursor to the next input box.
- Css controls code for force-breaking and non-wrapping in English and Chinese
- Prohibit web page right-click, copy, save as, View Source file and other functions to implement web page source code protection
- Php uses header () to download files. The downloaded files prompt that they are damaged and cannot be opened.
- Javascript shares the content with the code Summary of the websites on major social networking platforms