JavaScript Native xmlHttp and jquery ajax Methods json data format instance _ javascript skills

Source: Internet
Author: User
This article mainly introduces information about examples of JavaScript Native xmlHttp and jquery ajax methods in json data format. For more information, see Javascript ajax sends requests

(1) Create an XMLHttpRequest object. This object is the core of ajax requests and is the information carrier of ajax requests and responses. It is created in different browsers in different ways.

(2) Request Path

(3) Use the open Method to bind and send requests

(4) use the send () method to send requests

(5) obtain the xmlhttpRequest. responseText string returned by the server;

(6) obtain the value returned by the server and store xmlhttpRequest. responseXML as an xml object;

(7) Check and parse the XML Document Object using the W3C DOM node tree method and attributes.

Preface:

Recently, with the launch and implementation of the project, I am a little idle. In my spare time, I accidentally found the javascript Native xmlHttp ajax method and the jquery plug-in ajax method, so I will make some summary, tests were not performed on all browsers due to time. Currently, several IE8, 9, 10, Google Chrome, Mozilla Firefox, and Opera versions are commonly used. If problems are found during verification tests, please give me feedback in time. Thank you.

Let's get down to the truth and directly go to the Code:

Front-end code

  Ajax exercises  
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.