AJAX simple notes

Ajax represents Asynchronous JavaScript and XML (Asynchronous JavaScript and XML), a term which is a mix of some of the interactive technologies (JavaScript, Web browser and a Web server), which allows us to acquire and display new content without having to load a the new Web page. Enhance the user experience, feeling more desktop applications.

 What Ajax can do?

The new display HTML content without having to load the entire page

Submit a form and display the results immediately

Login instead jump to a new page

Star Rating Component

Traversing the database information without refreshing the page to load more ......

 

1. ajax request transmitting step of:

1, create XMLHttpRequest object

2, ready to send

3, performs the transmission operation

4, specify a callback function

 

2. Method Request

get

get request parameters passed in the url

Note that coding problems

post

post request parameter passed in the request body

Header information setting request requires

 

Guess you like

Origin www.cnblogs.com/BR-Tao/p/11106271.html