PHP basics of AJAX Interview

AJAX content basis

   The basic operating principle of Ajax

      Ajax basic concepts: by a small amount of data exchanged with the server in the background, Ajax can be used to implement asynchronous page updates

      Ajax works: XMLHttpRequest is the foundation of Ajax

               XMLHttpRequest for exchanging data with the server in the background,

      XMLHttpRequest Object Request

          open(method,url,async)

          send(string);

      XMLHttpRequest object response

          

   jQuery's Ajax operations

    responseText

    responseXML

    onreadystatechange

    readyState: 0 (uninitialized parent seeking), 1 (server connection is established), 2 (request has been received), 3 (request processing), 4 (request has been completed, and the response is ready)

    status:200    400

   Commonly used methods: $ (ele) .load () $ .ajax () $ .get () $ .post () $ getJSON () $ .getScript ()

Guess you like

Origin www.cnblogs.com/dcrq/p/11076433.html