20180822 Ajax Post Method request

Source: Internet
Author: User

1. What is Ajax

ajax:asynchronous JavaScript and XML ( asynchronous js and XML)

It can be used with the server ( asynchronous / Synchronous ) One of the techniques of interaction .

the language carrier of Ajax is JavaScript.

Maximum features: page does not refresh

Receive Server return information

what information can Ajax receive?

A: The information that the browser can receive can be received by Ajax, such as strings,HTML tags,css style content,xml content , JSON content and so on.

4. Ajax requests for Get and post methods

Ajax Object . Open (get/post, request address );

4.1 The difference between the two

① The amount of data passed to the server,get up to 2k

there is no limit to the post principle,php.ini is limited to 8M

② security,post transfer data is more secure

③ pass data in a different form

Get method passes parameters in the form of a request string behind a URL address

HTTP// URL /index.php? Name=tom&age=23&addr=beijing

The blue part is the request string, which is the " name - value " pair, with the & symbolic connection in the middle.

The post method is to send the form form data to the request and pass it to the server in XML form .

in JavaScript, information such as special symbols can be encoded by encodeURIComponent () .

Post

20180822 Ajax Post Method request

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.