Jquery waits for the ajax execution to complete and then continues to execute the following code.

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.