What is Ajax? JQuary basic operation for Ajax

Ajax: Asynchronous JavaScript And XML (Asynchronous JavaScript and XML)

  Web development technology to create interactive web applications

  

Ajax: a page without refreshing style of interaction with the server technology

  

  The original interactive:

    1, the browser sends a request

    2, the server receives a request, call processing Servlet; Servlet corresponding information generation processing will be completed;

    3, the browser receives the data server response to the previous page cleaning, showcase new data; in fact, to refresh the page []  

 

     (Browser and server interaction)

 

 

  Now interactive: (XmlHttpRequest Object [] is the underlying object of Ajax)

    1, XMLHttpRequest object is to help us send request

    2, the server receives a request, call processing Servlet; Servlet corresponding information generation processing will be completed;

    3, XMLHttpReuest object receiving data; (browser feel the data, xhr receive this data)

 

      (Ajax interaction with the server)

 

 

XmlHttpRequest object, modern browsers support XMLHttpRequest object

 

xhr original programming:

Check documents

 

 The steps are complicated

 

 JQyary-Ajax

  1、$get()

  2、$post()

  3、$ajax()

Changed the traditional way of interaction:

  1, requesting

  2, the server receives the request, processes the request page often to carry data. requst.setAttribute ( "map", map); forwarded to the page

  3, the browser receives the page data, to obtain data on the page using the expression el

  Cause the entire page refresh, cause great burden on the server

However, just let the server returns the data we need to; do not return the whole page; xhr alternative browser to receive the response; sending a request; use dom additions and deletions to change the way results page;

 

So,What is Ajax:

    Xhr nutshell it is the object sends a request to the server and receive the appropriate data, change the page using the information the way dom CRUD

 

Guess you like

Origin www.cnblogs.com/Timeouting-Study/p/12562312.html