Network Request-ajax

Source: Internet
Author: User

I. BACKGROUND

1 , URL Request schematic

2 , the development of the request page method

Web the traditional model (form ). the client sends a request to the server, and the server returns to the entire page, so repeatedly.

in Ajax model, the data is transferred independently between the client and the server. The server no longer returns the entire page.

Before the request data are used form form, but every request once, have to refresh the page again, the user experience is particularly bad, so now with Ajax, can implement partial page request data.

3 , form form

Method Action Enctype

<formAction=""Method="">        <inputtype= "text"name= "username">        <inputtype= "text"name= "Age">        <inputtype= "Submit"value= "Login">    </form>

Method : Get post, etc., get: request data, post input data

Action :Address

enctype: Specifies how the form data is encoded before it is sent application/x-www-form-urlencoded all characters are encoded before sending (default) Multipart/form-dat A (<input type= ' file ' >) does not encode characters. You must use this value when you use a form that contains a file upload control.

Second, Ajax

1 , what is Ajax

Use JavaScript to manipulate XML asynchronously (JSON is now working)

Full Name: Asynchronous JavaScript and XML asynchronous JS and XML

2 , asynchronous, synchronous

In human language: asynchronous (not simultaneous, in order) synchronization

In machine language: Asynchronous (simultaneous) synchronization (not at the same time, in order)

Network Request-ajax

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.